Entry point for nginx deployment
I have docked nginx which works fine if I start the shell, but (naturally enough) if I give "start nginx" myself as an entry point, it just unmounts and exits immediately due to no pending process.
My inclination is to do something like this:
pid=$(cat /run/nginx.pid)
while ps ax | awk '{print $1}' | grep -q $pid; do
sleep 60
done
Although this seems pretty hacky. But when I use Google for the example, I see people running bash.
Any pointers?
+3
source to share
1 answer
Ok, I opened the Dockerfile for you from the official nginx container and saw what they are using:
CMD ["nginx", "-g", "daemon off;"]
+11
source to share