diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-23 11:04:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 11:04:48 +0200 |
commit | dade9159e7a0f848e101221274faa3f4f03cf132 (patch) | |
tree | 4fc8aa7a9379260c103d86c37cfc0a2ad511a9e9 /pkg/specgen/specgen.go | |
parent | 2d24487ba244e5cd900f6aecc5d8896e1354d1ee (diff) | |
parent | 2faeb2189f81b6925d80aa8031cb5b19aa8618cb (diff) | |
download | podman-dade9159e7a0f848e101221274faa3f4f03cf132.tar.gz podman-dade9159e7a0f848e101221274faa3f4f03cf132.tar.bz2 podman-dade9159e7a0f848e101221274faa3f4f03cf132.zip |
Merge pull request #7054 from mheon/backports_203
Backports and Release Notes for v2.0.3
Diffstat (limited to 'pkg/specgen/specgen.go')
-rw-r--r-- | pkg/specgen/specgen.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go index 327c15c5a..bd738f5a7 100644 --- a/pkg/specgen/specgen.go +++ b/pkg/specgen/specgen.go @@ -1,6 +1,7 @@ package specgen import ( + "errors" "net" "syscall" @@ -130,6 +131,13 @@ type ContainerBasicConfig struct { // Remove indicates if the container should be removed once it has been started // and exits Remove bool `json:"remove,omitempty"` + // ContainerCreateCommand is the command that was used to create this + // container. + // This will be shown in the output of Inspect() on the container, and + // may also be used by some tools that wish to recreate the container + // (e.g. `podman generate systemd --new`). + // Optional. + ContainerCreateCommand []string `json:"containerCreateCommand,omitempty"` } // ContainerStorageConfig contains information on the storage configuration of a @@ -449,6 +457,15 @@ type PortMapping struct { Protocol string `json:"protocol,omitempty"` } +var ( + // ErrNoStaticIPRootless is used when a rootless user requests to assign a static IP address + // to a pod or container + ErrNoStaticIPRootless error = errors.New("rootless containers and pods cannot be assigned static IP addresses") + // ErrNoStaticMACRootless is used when a rootless user requests to assign a static MAC address + // to a pod or container + ErrNoStaticMACRootless error = errors.New("rootless containers and pods cannot be assigned static MAC addresses") +) + // NewSpecGenerator returns a SpecGenerator struct given one of two mandatory inputs func NewSpecGenerator(arg string, rootfs bool) *SpecGenerator { csc := ContainerStorageConfig{} |