docker / hub-feedback

Feedback and bug reports for the Docker Hub

Home Page:https://hub.docker.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker compose projects miss connecting some services to described networks in docker compose file, randomly, after an update

TheQuantumPhysicist opened this issue · comments

I have many docker-compose projects that I use to run my internal networking needs. Usually there is some default network + another external network that I use for monitoring the services. So it looks something like this for every service:

    networks:
      - myapp-network
      - status-network

Then at the end of my docker-compose file:

networks:
  myapp-network:
  status-network:
    external: true

Everything was working file for a long time. Over a year.

I have the habit of restarting and updating my containers every day, automatically (with a cron job). Kind of paranoia for security. After the last update 5:25.0.3-1~debian.12~bookworm 500, suddenly, some networks don't get connected, and I notice failures in my status monitoring just because the service isn't connected to its network. So I have to run docker network connect status-network <container-name>. After that, it works again fine.

So everything is fine... except that the network connection to specified networks in docker-compose, for some random services, has to be done manually for some random set of services every time a restart is triggered.

It doesn't happen with a specific service. It just happens all over the place. Some times just stopping/starting again works. For bigger projects with many containers, one or more just miss the mark and don't connect.

I'm on a Raspberry Pi 4 with the following OS:

Linux 6.1.0-rpi8-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux

Thanks for the report!

The bug you're seeing (docker/compose#11533) should be fixed by Docker Compose v2.24.7+. There will be a v25.0.4 Engine release soon, at which point the apt repos will be updated with both Compose + Engine. In the interim, you can download a static binary from GitHub Releases if needed.

Closing since this is a Compose bug with an existing tracking Issue in that project. Please use that thread for any followup. Thanks all!