fix Dockerfile and entrypoint script by leojonathanoh · Pull Request #20 · beevelop/docker-nginx-basic-auth
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.