Skip to content

Commit

Permalink
[Enhancement] set hostnames for nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
iwilltry42 committed May 6, 2019
1 parent a0d9089 commit 9ac8198
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cli/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ func createServer(verbose bool, image string, port string, args []string, env []
}

config := &container.Config{
Image: image,
Cmd: append([]string{"server"}, args...),
Hostname: containerName,
Image: image,
Cmd: append([]string{"server"}, args...),
ExposedPorts: nat.PortSet{
containerPort: struct{}{},
},
Expand Down Expand Up @@ -150,9 +151,10 @@ func createWorker(verbose bool, image string, args []string, env []string, name
}

config := &container.Config{
Image: image,
Env: env,
Labels: containerLabels,
Hostname: containerName,
Image: image,
Env: env,
Labels: containerLabels,
}

id, err := startContainer(verbose, config, hostConfig, networkingConfig, containerName)
Expand Down

0 comments on commit 9ac8198

Please sign in to comment.