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

fix Dockerfile and entrypoint script

Open leojonathanoh opened this issue 5 years ago • 0 comments

In entrypoint script launch.sh

By using exec "$@" at the end, nginx will be PID 1 inside the docker container, instead of /bin/sh. It also allows kill signals to reach nginx directly from the docker host.

In Dockerfile

By using ENTRYPOINT ["./launch.sh"] it makes it clear that launch.sh is the entrypoint, especially when using docker inspect <image>. By using CMD ["nginx", "-g", "daemon off;"], it allows the users to override the CMD if they prefer.

leojonathanoh avatar Mar 10 '19 00:03 leojonathanoh