...
# Create user and set ownership and permissions as required
RUN adduser -D myuser && chown -R myuser /myapp-data
# ... copy application files
# Healthcheck
HEALTHCHECK --interval=5m --timeout=3s CMD curl -f http://localhost/ || exit 1
# Finalize
USER myuser
ENTRYPOINT [“/myapp”]
...
Last active
March 11, 2021 10:28
-
-
Save KMurphs/baaec7fda68454ec3c9a9955b7e77934 to your computer and use it in GitHub Desktop.
Dockerfile Best Practices
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Content extracted from https://dzone.com/articles/top-20-dockerfile-best-practices