Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TheQuantumPhysicist opened this issue Mar 6, 2024 · 2 comments

Comments

@TheQuantumPhysicist
Copy link

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
@milas
Copy link

milas commented Mar 6, 2024

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.

@binman-docker
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants