Last active
October 10, 2023 17:46
-
-
Save linux4life798/56aa3b0533b4ae9f7d9b188e1bc53499 to your computer and use it in GitHub Desktop.
Docker setup local user/group
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 debian:latest | |
ENV USER me | |
RUN useradd --create-home --user-group "${USER}" | |
# HOME will be set already within the container, after setting user, but we | |
# set it here to be usable from within this Dockerfile. | |
ENV HOME "/home/${USER}" | |
WORKDIR "${HOME}" | |
RUN pwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment