Skip to content

Commit

Permalink
Supply hostname and domain to driver when creating endpoint
Browse files Browse the repository at this point in the history
Mainly as a (vast) convenience.
  • Loading branch information
squaremo committed Jun 2, 2015
1 parent 4410e02 commit 8014c31
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions daemon/container_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,8 @@ func (container *Container) buildCreateEndpointOptions() ([]libnetwork.EndpointO
var (
portSpecs = make(nat.PortSet)
bindings = make(nat.PortMap)
hostname = container.Config.Hostname
domainname = container.Config.Domainname
pbList []types.PortBinding
exposeList []types.TransportPort
createOptions []libnetwork.EndpointOption
Expand Down Expand Up @@ -714,6 +716,11 @@ func (container *Container) buildCreateEndpointOptions() ([]libnetwork.EndpointO
createOptions = append(createOptions, libnetwork.EndpointOptionGeneric(genericOption))
}

createOptions = append(createOptions, libnetwork.EndpointOptionGeneric(options.Generic{
"io.docker.network.hostname": hostname,
"io.docker.network.domainname": domainname,
}))

return createOptions, nil
}

Expand Down

0 comments on commit 8014c31

Please sign in to comment.