Skip to content

Instantly share code, notes, and snippets.

@progress44
Created December 1, 2017 21:34
Show Gist options
  • Save progress44/878f485044205014e02f76709d9a7150 to your computer and use it in GitHub Desktop.
Save progress44/878f485044205014e02f76709d9a7150 to your computer and use it in GitHub Desktop.
Create a user in dockerfile
# Provide a non-root user to run the process.
RUN groupadd --gid 1000 username && \
useradd --uid 1000 --gid 1000 \
--home-dir /usr/share/username --no-create-home \
username
USER username
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment