Last active
March 24, 2021 19:07
-
-
Save developer-guy/590a0a4ea479b01c8bad8a9829544c24 to your computer and use it in GitHub Desktop.
non-root docker user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster | |
# Runs as root: | |
RUN apt-get update && apt-get -y upgrade | |
# Switch to non-root user: | |
RUN useradd --create-home appuser | |
WORKDIR /home/appuser | |
USER appuser | |
# Runs as non-root user: | |
ENTRYPOINT ["whoami"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment