mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Add Hostname to the docker run command.
This commit is contained in:
parent
b0b9606aea
commit
dc61547b95
@ -386,6 +386,7 @@ func (kl *Kubelet) runContainer(manifest *api.ContainerManifest, container *api.
|
|||||||
opts := docker.CreateContainerOptions{
|
opts := docker.CreateContainerOptions{
|
||||||
Name: buildDockerName(manifest, container),
|
Name: buildDockerName(manifest, container),
|
||||||
Config: &docker.Config{
|
Config: &docker.Config{
|
||||||
|
Hostname: container.Name,
|
||||||
Image: container.Image,
|
Image: container.Image,
|
||||||
ExposedPorts: exposedPorts,
|
ExposedPorts: exposedPorts,
|
||||||
Env: envVariables,
|
Env: envVariables,
|
||||||
|
Loading…
Reference in New Issue
Block a user