Set the alias to the service name instead of the network name

This makes it work a little closer to compose part and it is more
correct 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit ee08c8542a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Vincent Demeester 2017-03-27 11:42:15 +02:00 committed by Victor Vieux
parent 6ddedae595
commit b721d55399

View file

@ -46,7 +46,7 @@ func deployBundle(ctx context.Context, dockerCli *command.DockerCli, opts deploy
for _, networkName := range service.Networks {
nets = append(nets, swarm.NetworkAttachmentConfig{
Target: namespace.Scope(networkName),
Aliases: []string{networkName},
Aliases: []string{internalName},
})
}