Created
November 22, 2017 01:11
-
-
Save thejsj/73d4ae8077dce91528b5bcc907d5f9b0 to your computer and use it in GitHub Desktop.
Creating user and assigning ownership inside Dockerfile
This file contains 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 ubuntu:latest | |
RUN useradd --uid 2000 -ms /bin/bash example | |
RUN mkdir -p /etc/example | |
RUN chown -Rv 2000 /etc/example | |
RUN ls -la /etc | grep example | |
USER 2000 | |
CMD ["sh", "-c ls -la /etc | grep example"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment