Dependency between containers


I’m faced with situation when containers should start in exact order. Application should be started only when Postgress database fully initialized. Such problem usually solved by “depends_on” instruction with healthcheck conditions in docker-compose file. But Pantaris doesn’t support version of compose file which allow to use such instruction. There is restriction to 3.2-3.7 versions where conditions weren’t support.
I also tried to use wait-for-it script and past it into entrypoint, but got the error:

Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: “/app/”: permission denied: unknown

How conditional order task is intendent to solve in Pantaris?

Hi @external.evgeny.burm

it’s right depends-on is not supported (does not depend on the docker-compose-version).

To handle it, the wait-for approach is a good way. I don’t know the script you refering, but it might be just a minor issue: Verify, the script is executable (at all chmod u+x and can be used by the user of your docker-image, in case there are multiple)

Another option is to implement re-connecting in your application. So it would also work if the db-container restarts unplanned.