summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/container_create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-10 19:10:59 +0100
committerGitHub <noreply@github.com>2020-11-10 19:10:59 +0100
commitce2ac7d2d2413074f9855acbaa7be0b4d5d726e4 (patch)
tree687c943d5ed8e7548f6c7f3888b701f99a33cde1 /pkg/specgen/generate/container_create.go
parentda01191aa3526e3a77d9a055e23c318c26720785 (diff)
parentb7b5b6f8e3072530f4c3fc07e5960e54c90729b5 (diff)
downloadpodman-ce2ac7d2d2413074f9855acbaa7be0b4d5d726e4.tar.gz
podman-ce2ac7d2d2413074f9855acbaa7be0b4d5d726e4.tar.bz2
podman-ce2ac7d2d2413074f9855acbaa7be0b4d5d726e4.zip
Merge pull request #8251 from baude/networkaliases
network aliases for container creation
Diffstat (limited to 'pkg/specgen/generate/container_create.go')
-rw-r--r--pkg/specgen/generate/container_create.go4
1 files changed, 4 insertions, 0 deletions
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