Open goofballtech opened 7 months ago
i have the same situation, i use docker compose in ubuntu, but when i reboot my machine, the docker doesn't respect compose depends_on condition order; when i use 'docker compose up -d', the depends_on condition order works well. (and i find that when machine reboot, the container actually doesn`t refresh, when use 'docker compose down' and 'docker compose up -d', the container just refresh)
Description
I have a docker compose set up as below. The mongo instance runs and is healthy before the maint container spins up when running from the compose but when docker desktop opens they both run in parallel so the mongo connection isn't yet present. When you restart then from the UI it give the same. If you stop the containers with the stop button then play them with the compose play then they will spin up properly with a 15 to 20 second delta in timing.
As starts and/or pressing restart within UI
Stop and start with the stop/play button in UI or docker-compose up/docker-compose start at command line.
Reproduce
docker-compose up reboot pc Containers do not come up in proper order
Expected behavior
the containers should adhere to the restraints specified in the compose file when docker desktop startup rather than ignoring them and spinning up both containers in parallel.
docker version
docker info
Diagnostics ID
5717D1B3-8ABD-4E76-B937-67774A9DB9EF/20240312005310
Additional Info
No response