Skip to content

Creates non root user in Dockerfile #1429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2018

Conversation

AndreMiras
Copy link
Member

Subsequent p4a command will run as unprivileged user.
This makes the setup more realistic/closer to an actual setup.

Also added .dockerignore so container and host generated files don't conflict.

@@ -36,7 +40,7 @@ ENV ANDROID_NDK_DL_URL="https://dl.google.com/android/repository/${ANDROID_NDK_A

# install system dependencies
RUN apt update -qq && apt install -qq --yes --no-install-recommends \
python virtualenv python-pip wget curl lbzip2 patch bsdtar && \
python virtualenv python-pip wget curl lbzip2 patch bsdtar sudo && \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added sudo because it could still be useful on interactive shell

RUN "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "build-tools;26.0.2"
RUN "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "platforms;android-19" && \
"${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "build-tools;26.0.2" && \
chmod +x "${ANDROID_SDK_HOME}/tools/bin/avdmanager"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non root user also need execution rights, hence the chmod

Subsequent p4a command will run as unprivileged user.
This makes the setup more realistic/closer to an actual setup.

Also added .dockerignore so container and host generated files don't
conflict.
@AndreMiras AndreMiras force-pushed the feature/docker_non_root branch from 8ac64b5 to 4871a61 Compare October 24, 2018 11:02
@AndreMiras AndreMiras merged commit cf6164d into kivy:master Oct 27, 2018
@AndreMiras AndreMiras deleted the feature/docker_non_root branch October 27, 2018 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants