summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-19 16:22:05 -0400
committerGitHub <noreply@github.com>2021-04-19 16:22:05 -0400
commita94360a3f742cac07b006233371058d8b8c2caf3 (patch)
tree3dbbde6b5388f96f1552ca173bf49d0b49fa8e1a /pkg
parentb5e0b292bf4ebf98a1ad45681da5f297d86de44b (diff)
parent4ffaa50d05bcb08d7db242232a128bb3493fcf25 (diff)
downloadpodman-a94360a3f742cac07b006233371058d8b8c2caf3.tar.gz
podman-a94360a3f742cac07b006233371058d8b8c2caf3.tar.bz2
podman-a94360a3f742cac07b006233371058d8b8c2caf3.zip
Merge pull request #10041 from chenk008/add_pidfile_flag
Add flag "--pidfile" for podman create/run
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgen/generate/container_create.go3
-rw-r--r--pkg/specgen/specgen.go4
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index ef9975021..13d4b4926 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -375,6 +375,9 @@ func createContainerOptions(ctx context.Context, rt *libpod.Runtime, s *specgen.
}
options = append(options, libpod.WithDependencyCtrs(deps))
}
+ if s.PidFile != "" {
+ options = append(options, libpod.WithPidFile(s.PidFile))
+ }
return options, nil
}
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go
index 28111f96d..e3d4b1436 100644
--- a/pkg/specgen/specgen.go
+++ b/pkg/specgen/specgen.go
@@ -171,6 +171,10 @@ type ContainerBasicConfig struct {
// container. Dependencies can be specified by name or full/partial ID.
// Optional.
DependencyContainers []string `json:"dependencyContainers,omitempty"`
+ // PidFile is the file that saves container process id.
+ // set tags as `json:"-"` for not supported remote
+ // Optional.
+ PidFile string `json:"-"`
}
// ContainerStorageConfig contains information on the storage configuration of a