Skip to content

Instantly share code, notes, and snippets.

@linux4life798
Last active October 10, 2023 17:46
Show Gist options
  • Save linux4life798/56aa3b0533b4ae9f7d9b188e1bc53499 to your computer and use it in GitHub Desktop.
Save linux4life798/56aa3b0533b4ae9f7d9b188e1bc53499 to your computer and use it in GitHub Desktop.
Docker setup local user/group
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