Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Docker compose networking doesn't work any more #2255

Open
bf opened this issue Jul 11, 2023 · 5 comments
Open

Docker compose networking doesn't work any more #2255

bf opened this issue Jul 11, 2023 · 5 comments

Comments

@bf
Copy link

bf commented Jul 11, 2023

I have several previously working docker-compose projects and suddenly hostname, networks and especially network: aliases: do not work any more with docker-compose.

In the last few days I've seen this in multiple projects. The documentation is not updated at all, while both my dev and production environments break.

I've chose docker to have a stable tool and now it seems they reinvent their whole networking stack. It's a big mess.

@bf
Copy link
Author

bf commented Jul 11, 2023

I feel the new docker compose also has hiccups when you define several networks for a service.
I think there is different behaviour between these two yaml definitions, even though they should be the same:

services:
  app:
    networks:
      - foo
      - bar

and

services:
  app:
    networks:
      foo:
      bar:

and

services:
  app:
    networks:
      foo:
         aliases:
            - breakingchanges
      bar:

and

services:
  app:
    networks:
      bar:
      foo:
         aliases:
            - breakingchanges

@mzglinski
Copy link

Having a similar issue, both mongo and proxy networks are external. Sometimes the containers will be attached to the mongo network, sometimes they will not. It is a bizarre behavior.

services:
  app:
    networks:
      - proxy
      - mongo

I do not see anything in the daemon logs that could be related to this. Rolling back to version 2.17.3 of docker compose plugin might have fixed the issue, but I will have to wait and see to be sure.

@bf
Copy link
Author

bf commented Jul 12, 2023

@mzglinski there was a docker-compose update released yesterday which fixes this bug. It was a "random" network interface not working bug for 5 days. I nearly went crazy.

Just update and check again please. Then we can close this issue.

@mzglinski
Copy link

mzglinski commented Jul 12, 2023

@bf Oh, thanks for the heads up. 2.20 is not yet available in the Debian repository but I will update and check once it is.

@mzglinski
Copy link

Getting the update on Debian took a while, but I can confirm it is working as expected now.

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

No branches or pull requests

2 participants