diff --git a/command/stack/deploy.go b/command/stack/deploy.go index 63adeacd62..3075477b83 100644 --- a/command/stack/deploy.go +++ b/command/stack/deploy.go @@ -531,7 +531,7 @@ func convertService( func convertExtraHosts(extraHosts map[string]string) []string { hosts := []string{} for host, ip := range extraHosts { - hosts = append(hosts, fmt.Sprintf("%s %s", host, ip)) + hosts = append(hosts, fmt.Sprintf("%s %s", ip, host)) } return hosts }