feat: set container hostname equal to container name

This commit is contained in:
Pavel Sviderski
2025-03-03 16:58:42 +10:00
parent 342969b7f4
commit 137abde808
+3 -2
View File
@@ -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,