I'm using docker 3.5
. In this docker version I've got an issue with nodes dependencies at start time. I tried to resolve it as it was recommended using external sh
script coping into docker file. It lead to more issues. For example `script is present but execution was not detected, executed, but program was not started. My docker-compose is up, but swarm mode is failed and so on...
I think I'm not clear with Docker life cycle. Lets imagine we have Dockerfile
, docker-compose.yml
and docker-swarm.yml
. Each of them has an CMD
and ENTRYPOINT
instruction.
Starting docker-compose
I can detect that my service waits for required one (because of waiting script). In case I'm using swarm mode i'm getting fails and my service can't start correctly.
Can you please help with considering lifecycle?
there are instructions:
- CMD (docker file)
- ENTRYPOINT (docker file)
- entrypoint (docker-compose)
- command (docker-compose)
- entrypoint (docker-swarm)
- command (docker-swarm)
Is it possible to have information about execution order of specified instructions for different scenarios?