You started the worker service, but it's not in docker ps. It vanished within a second of starting:
$ docker run -d --name worker ingest-worker:2.0
a9f17c4e8b30...
$ docker ps
CONTAINER ID IMAGE COMMAND ... STATUS ... NAMES
# (worker is not listed)
There's no crash and no error. Find out why the container won't stay up and state the fix.
worker — ingest-worker:2.0, started with docker run -d, already gonedocker ps.
$ docker ps -a
CONTAINER ID IMAGE COMMAND STATUS NAMES
a9f17c4e8b30 ingest-worker:2.0 "/start.sh" Exited (0) 14 seconds ago worker
$ docker logs worker
[boot] ingest-worker 2.0 starting
...
[boot] launching worker process in the background
[boot] worker started (pid 23)
[boot] startup complete
Exit code 0 (a clean exit), and the logs say startup completed — yet the container is stopped.
You've solved it when:
docker ps -a; docker inspect worker → State.ExitCode 0,
Running false) — and explained that a container runs only as long as its
PID 1 (the entrypoint). The entrypoint launched the worker in the
background (worker &) and returned, so PID 1 exited 0 and Docker
stopped the container. NOT misdiagnosed as a crash, an OOM kill, or a
missing image (exit 0, logs say "startup complete").
exec it (exec python worker.py), drop the trailing &, or use
the app's foreground flag (e.g. nginx -g 'daemon off;') — so the
container stays up.
docker CLI only.docker restart worker does NOT help — it runs the same daemonizingexec-ing the worker (exec python worker.py) instead ofdocker stop)?
nginx and redis-server --daemonize yes hit this same trap, and