moby / moby/libnetwork

libnetwork forcing a bridge to have an address

Open
#1,867 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
875
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to setup docker to use externally provided bridge interface and IP addresses pool - no iptables, no docker0 interface - everything is done by the external firewall and the host should not be able to directly talk to containers. Docker should concentrate on running containers only.

Unfortunately, this is impossible - docker overwrites my setup (no ip address on the interface) and assigns one itself:

https://github.com/docker/libnetwork/blob/master/drivers/bridge/bridge.go#L715

Is it possible to disable this behaviour somehow? After the daemon starts, I can remove the IP address and I am still able to use my containers.

Thanks

  • daemon.json
{
    "storage-driver": "devicemapper",
    "storage-opts": [
        "dm.thinpooldev=/dev/mapper/vg--main-sys--docker--thinpool",
        "dm.use_deferred_removal=true"
    ],
    "bridge": "br-vms",
    "fixed-cidr": "172.16.0.0/16",
    "default-gateway": "172.16.0.1",
    "dns": ["172.16.0.1"],
    "iptables": false,
    "ip-forward": false
    }
  • docker version
Client:
 Version:      17.07.0-ce-rc1
 API version:  1.31
 Go version:   go1.8.3
 Git commit:   8c4be39
 Built:        Wed Jul 26 20:55:16 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.07.0-ce-rc1
 API version:  1.31 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   8c4be39
 Built:        Wed Jul 26 20:56:37 2017
 OS/Arch:      linux/amd64
 Experimental: false

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with drivers/bridge/bridge.go at the linked line and compare that behavior with the daemon.json settings, especially bridge, fixed-cidr, iptables, and ip-forward. Determine whether the externally managed bridge can remain without an assigned address, and verify the expected container networking behavior after startup.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.