summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/container_create.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-05 13:52:15 +0000
committerGitHub <noreply@github.com>2021-08-05 13:52:15 +0000
commit1f0a24437d71f8fe2b2233a428202afcfe513666 (patch)
treee17f57dce6bf61d38a74fc6b8f011bffbb4082fa /pkg/specgen/generate/container_create.go
parent117583c293713f2baa920c4035e820ad59fe6622 (diff)
parent3c3fa6fac4d0f8e89181ea2d4e1fe0318d24b6f4 (diff)
downloadpodman-1f0a24437d71f8fe2b2233a428202afcfe513666.tar.gz
podman-1f0a24437d71f8fe2b2233a428202afcfe513666.tar.bz2
podman-1f0a24437d71f8fe2b2233a428202afcfe513666.zip
Merge pull request #11011 from baude/initcontainers
implement init containers in podman
Diffstat (limited to 'pkg/specgen/generate/container_create.go')
-rw-r--r--pkg/specgen/generate/container_create.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 4e3a86ae4..5101a6ccb 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -144,11 +144,14 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener
options = append(options, libpod.WithNetworkAliases(s.Aliases))
}
+ if containerType := s.InitContainerType; len(containerType) > 0 {
+ options = append(options, libpod.WithInitCtrType(containerType))
+ }
+
if len(s.Devices) > 0 {
opts = extractCDIDevices(s)
options = append(options, opts...)
}
-
runtimeSpec, err := SpecGenToOCI(ctx, s, rt, rtc, newImage, finalMounts, pod, command)
if err != nil {
return nil, err