The -b
in crond -b
means to run it as a daemon (in the background), though it appears that is also the default (source). This means the script will continue, but since that’s the last line it exits. With the entrypoint stopped, the container also stops.
The fix should be to replace that line with exec crond -f
so the crond
process runs in the foreground and becomes the main process running in the container, replacing the entrypoint script. crond -f
without exec
should also work, but that needlessly keeps an extra process (the shell running the entrypoint script) alive.
C and C++?