Closed kupietz closed 8 months ago
Is that a docker-compose fork? https://docs.docker.com/compose/release-notes/ lists 2.13.0 (2022-11-23) as the most recent version and it includes depends_on
.
I mean the compose specification 3 and also the latest compose version https://docs.docker.com/compose/release-notes/ lists 2.13.0 (2022-11-23)
Both support depends_on
, but not a condition
option for depends_on
so that you can only test if another container is started. With the old docker-compose version 1.29.2 condition
still works for me.
EDIT: BTW: also with restart: on-failure
it doesn't work very well.
Interesting - I guess, the compose specification deviates here from the docker compose specification. I thought following the non-implementation specific specification would help to be compatible with podman. There depends_on
supports conditions. We may want to downgrade to a 2.x-version then ... ?
Do you think this would help or have you tried it? I think the problem is that Docker Compose version v2.13.0
does not support the config
option of depends_on
.
$ INDEX=./index /usr/local/bin/docker-compose --profile=full up -d
[+] Running 0/0
⠋ Container 230877c6b31b_230877c6b31b_230877c6b31b_korap-docker_kustvakt-full_1 Recreate 0.0s
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /home/kupietz/KorAP-Docker/super_client_info
kupietz@pc-409:~/KorAP-Docker$ /usr/local/bin/docker-compose -v
Docker Compose version v2.13.0
versus:
kupietz@pc-409:~/KorAP-Docker$ INDEX=./index /usr/bin/docker-compose --profile=full up -d
Recreating korap-docker-full-init-1 ... done
Recreating 230877c6b31b_230877c6b31b_230877c6b31b_230877c6b31b_korap-docker_kustvakt-full_1 ... done
Recreating korap-docker_kalamar-full_1 ... done
kupietz@pc-409:~/KorAP-Docker$ /usr/bin/docker-compose -v
docker-compose version 1.29.2, build unknown
But it doesn't matter as we can simple start profile init first.
podman-compose
is a different issue.
Well - I have no problems with docker-compose 2.14.0
either way ... so I can't really say there is a difference. The containers are all created at startup and then kustvakt waits until kalamar init exits with 0.
Oh - maybe the -d
is the problem? When all containers are detached, the exit code may not be catchable?
No - works for me with -d
as well ...
It seems that the startup order works correctly (with all depends_on blabla) also on kodi, but the file is created on run time, not creation time. But for me configs
work on kodi and they seem to be mounted (or rather loaded) on runtime instead of creation time. I created a KorAP-Docker-2
directory with an adjusted compose file and for me that worked.
While configs work on kodi, they do not work in the GitHub CI instance ...
We probably want init to be removed from the full profile and live with the separate step until we find a stable and portable oneliner.
Seems to be rock-stable, now, and the oneliner is already on gerrit.
docker-compose 3.8 does not support depends_on/condition anymore. Maybe just use
restart: on-failure
and/or change Readme to start profile init first.