google / moodle-on-gcp

Apache License 2.0
60 stars 21 forks source link

question: why is tail at the end of entrypoint.sh? #24

Open kewalaka opened 3 hours ago

kewalaka commented 3 hours ago

Using tail -f /dev/null as the main process in a container seems inadvisable because tail doesn't respond to signals like SIGHUP, SIGINT, or SIGTERM in a meaningful way.

It also seems redundant, because the nginx -g 'daemon off;' command already keeps the container running in the foreground. Without tail, Nginx would be acting as the main process in the container?

Would you be able to share the reason for this please?

kewalaka commented 3 hours ago

ref - https://github.com/google/moodle-on-gcp/blob/main/4-moodle-image-builder/base/opt/entrypoint.sh#L24C1-L24C18