mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
feat: set container hostname equal to container name
This commit is contained in:
@@ -41,8 +41,9 @@ func (cli *Client) CreateContainer(
|
|||||||
containerName := fmt.Sprintf("%s-%s", spec.Name, suffix)
|
containerName := fmt.Sprintf("%s-%s", spec.Name, suffix)
|
||||||
|
|
||||||
config := &container.Config{
|
config := &container.Config{
|
||||||
Cmd: spec.Container.Command,
|
Cmd: spec.Container.Command,
|
||||||
Image: spec.Container.Image,
|
Hostname: containerName,
|
||||||
|
Image: spec.Container.Image,
|
||||||
Labels: map[string]string{
|
Labels: map[string]string{
|
||||||
api.LabelServiceID: serviceID,
|
api.LabelServiceID: serviceID,
|
||||||
api.LabelServiceName: spec.Name,
|
api.LabelServiceName: spec.Name,
|
||||||
|
|||||||
Reference in New Issue
Block a user