docker-nginx icon indicating copy to clipboard operation
docker-nginx copied to clipboard

documentation on custom CMD/ENTRYPOINT

Open ne555 opened this issue 11 months ago • 3 comments

# alpine-slim/Dockerfile
ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 80

STOPSIGNAL SIGQUIT

CMD ["nginx", "-g", "daemon off;"]
# entrypoint/docker-entrypoint.sh
if [ "$1" = "nginx" ] || [ "$1" = "nginx-debug" ]; then
#  code that executes /docker-entrypoint.d/ scripts

so for a custom CMD to actually execute those scripts it has to be on the form

CMD ["foo", "/docker-entrypoint.sh", "nginx", "-g", "daemon off;"]

but there is no such mention on the documentation https://hub.docker.com/_/nginx/

ne555 avatar Mar 21 '24 13:03 ne555