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 driver uses real bridge network address in port mapping instead of one specified in bridge.host_binding_ipv4 #1187

Closed
narqo opened this issue May 19, 2016 · 5 comments

Comments

@narqo
Copy link

narqo commented May 19, 2016

It seems that nomad's docker driver always use real IPv4 address of docker's bridge for port mapping (see code for docker driver). In my case this leads to undesirable behaviour, as containers are not accessible from the outer world as my server is IPv6-only.

As far as I can see, by default docker binds exposed port to an IP specified in com.docker.network.bridge.host_binding_ipv4 network address, which is 0.0.0.0 for default bridge (see docker container network docs, https://docs.docker.com/engine/userguide/networking/dockernetworks/).

It'd nice if nomad support host_binding_ipv4 option as well.

/cc @bogdanov1609

Nomad version

› nomad version
Nomad v0.3.2

Operating system and Environment details

Linux, Ubuntu 14.04

Issue

Reproduction steps

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

Job file (if appropriate)

job "deploy-service" {
  task "service" {
    driver = "docker"
      config {
        network_mode = "bridge"
        image = "my-service"
        port_map {
          api = 14150
        }
      }
      ···
@narqo narqo changed the title docker driver use real bridge network address in port mapping instead of one specified in bridge.host_binding_ipv4 docker driver uses real bridge network address in port mapping instead of one specified in bridge.host_binding_ipv4 May 19, 2016
@aluminous
Copy link

aluminous commented Oct 12, 2016

Any news on this?

Since this isn't (currently?) configurable via nomad, respecting Docker's configuration seems like the most intuitive behavior.

In our case, this also prevents access to any containers started by nomad since they all listen on an interface which isn't accessible from other hosts.

@dadgar dadgar added this to the v0.5.1 milestone Oct 12, 2016
@dadgar
Copy link
Contributor

dadgar commented Oct 12, 2016

Hey, hopefully will have a chance to look into this soon!

@tgross tgross modified the milestones: near-term, unscheduled Jan 9, 2020
@schmichael
Copy link
Member

@nickethier can you take a look at this before our next release?

@nickethier
Copy link
Member

With multi-interface host networking I think goal of whats being asked here is now possible. To pick the IP to port map to. Please feel free to open a new issue with updated information if not. Thankyou!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants