summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-27 12:16:28 +0100
committerGitHub <noreply@github.com>2020-10-27 12:16:28 +0100
commit5c0849534d7bed20ec588d8ec0099a8b60df7e25 (patch)
tree1e8e2a60c1fa0f0c3f7a4743ddb0268e5d53c963 /pkg/domain/infra/abi
parentdbbd5987fde0547305bc42a27d355d2de9e08dd3 (diff)
parent32af1be01a37362d81baff47a2bb28e4c863a8c9 (diff)
downloadpodman-5c0849534d7bed20ec588d8ec0099a8b60df7e25.tar.gz
podman-5c0849534d7bed20ec588d8ec0099a8b60df7e25.tar.bz2
podman-5c0849534d7bed20ec588d8ec0099a8b60df7e25.zip
Merge pull request #8094 from rhatdan/cidfile
The cidfile should be created when the container is created
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r--pkg/domain/infra/abi/containers.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index 60dbbce6c..98b886845 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -29,6 +29,7 @@ import (
"github.com/containers/podman/v2/pkg/signal"
"github.com/containers/podman/v2/pkg/specgen"
"github.com/containers/podman/v2/pkg/specgen/generate"
+ "github.com/containers/podman/v2/pkg/util"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -846,6 +847,12 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
return nil, err
}
+ if opts.CIDFile != "" {
+ if err := util.CreateCidFile(opts.CIDFile, ctr.ID()); err != nil {
+ return nil, err
+ }
+ }
+
var joinPod bool
if len(ctr.PodID()) > 0 {
joinPod = true