Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

external default network specification not being used #484

Open
timoreimann opened this issue Jul 11, 2017 · 0 comments
Open

external default network specification not being used #484

timoreimann opened this issue Jul 11, 2017 · 0 comments

Comments

@timoreimann
Copy link

I'm trying to use a compose manifest where an external default network is being defined. However, it seems like the configuration isn't being honored.

To illustrate my problem, I put together an example repo (note the extra branch I have created for this purpose). The external network is defined here. Starting that compose file with docker-compose like

docker-compose -f simple.yml up

and inspecting the curl (client) container, I see the network being in use:

$ docker inspect libcomposetest_client_1 | jq '.[0].NetworkSettings.Networks'
{
  "ext_network": {
    "IPAMConfig": null,
    "Links": null,
    "Aliases": [
      "client",
      "ef167dd59b6e"
    ],
    "NetworkID": "b7f41ea27a92dda4c06954e05db6b77a1c9928049947f478a9b9da9fd832068a",
    "EndpointID": "",
    "Gateway": "",
    "IPAddress": "",
    "IPPrefixLen": 0,
    "IPv6Gateway": "",
    "GlobalIPv6Address": "",
    "GlobalIPv6PrefixLen": 0,
    "MacAddress": "",
    "DriverOpts": null
  }
}

Doing the same via libcompose through my example application started with go run main.go -f simple.yml, the default compose network is referenced:

$ docker inspect dockercomposetestsimple_client_1 | jq '.[0].NetworkSettings.Networks'
{
  "dockercomposetestsimple_default": {
    "IPAMConfig": null,
    "Links": null,
    "Aliases": [
      "client",
      "73f02e7f701f"
    ],
    "NetworkID": "70a1649c8835f333569837e489d61eccfa34029c3f7293604299ec942ee07e3d",
    "EndpointID": "",
    "Gateway": "",
    "IPAddress": "",
    "IPPrefixLen": 0,
    "IPv6Gateway": "",
    "GlobalIPv6Address": "",
    "GlobalIPv6PrefixLen": 0,
    "MacAddress": "",
    "DriverOpts": null
  }
}

I have also tried to tweak some settings during project creation, but to no avail.

Happy to provide more details if needed.

Thanks :)

/cc @vdemeester

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