From b7b5b6f8e3072530f4c3fc07e5960e54c90729b5 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 29 Oct 2020 15:54:33 -0500 Subject: network aliases for container creation podman can now support adding network aliases when running containers (--network-alias). It requires an updated dnsname plugin as well as an updated ocicni to work properly. Signed-off-by: baude --- pkg/specgen/generate/container_create.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/specgen/generate') diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go index 53dc35df1..c049e64cf 100644 --- a/pkg/specgen/generate/container_create.go +++ b/pkg/specgen/generate/container_create.go @@ -133,6 +133,10 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener } options = append(options, libpod.WithExitCommand(exitCommandArgs)) + if len(s.Aliases) > 0 { + options = append(options, libpod.WithNetworkAliases(s.Aliases)) + } + runtimeSpec, err := SpecGenToOCI(ctx, s, rt, rtc, newImage, finalMounts, pod, command) if err != nil { return nil, err -- cgit v1.2.3-54-g00ecf