Skip to content

Instantly share code, notes, and snippets.

@developer-guy
Last active March 24, 2021 19:07
Show Gist options
  • Save developer-guy/590a0a4ea479b01c8bad8a9829544c24 to your computer and use it in GitHub Desktop.
Save developer-guy/590a0a4ea479b01c8bad8a9829544c24 to your computer and use it in GitHub Desktop.
non-root docker user
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