Skip to content

Commit

Permalink
This allows you to use the container IPv6 address for service registr…
Browse files Browse the repository at this point in the history
…ation.

Add use_ipv6_address = "true" as a label to the labels in the docker
driver configuration in your job

config {
        labels = {
            use_ipv6_address = "true"
        }
}
  • Loading branch information
42wim committed Jan 21, 2018
1 parent f5d0b87 commit f991a0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,10 @@ func (d *DockerDriver) detectIP(c *docker.Container) (string, bool) {
}

ip = net.IPAddress
if d.driverConfig.Labels["use_ipv6_address"] == "true" {
ip = net.GlobalIPv6Address
}

ipName = name

// Don't auto-advertise IPs for default networks (bridge on
Expand Down

0 comments on commit f991a0a

Please sign in to comment.