Skip to content

Instantly share code, notes, and snippets.

@peterszatmary
Created October 24, 2016 19:56
Show Gist options
  • Save peterszatmary/6dc18603fdb1a1e5737b90cd3e4cc4ea to your computer and use it in GitHub Desktop.
Save peterszatmary/6dc18603fdb1a1e5737b90cd3e4cc4ea to your computer and use it in GitHub Desktop.
Dockerfile focused on how to create properly regular user with Docker. elixir:latest image was used with this example.
FROM elixir:latest
# not root but rather work with regular user
RUN useradd -ms /bin/bash regularuser
USER regularuser
WORKDIR /home/regularuser/
EXPOSE 4000
# Run REPL
CMD ["iex"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment