diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-29 18:15:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 18:15:24 +0100 |
commit | c8f0e1dab602ed94af95dc4f604f161696f249e0 (patch) | |
tree | 1d8fe4e091300aa7c2c6e61fcb1a509c382974b0 /pkg/specgen/specgen.go | |
parent | e439aec4fa867cda0672079dac0fe394dfb3306c (diff) | |
parent | 65a618886efc48562e5b9ff99ca630c83622419b (diff) | |
download | podman-c8f0e1dab602ed94af95dc4f604f161696f249e0.tar.gz podman-c8f0e1dab602ed94af95dc4f604f161696f249e0.tar.bz2 podman-c8f0e1dab602ed94af95dc4f604f161696f249e0.zip |
Merge pull request #8146 from vrothberg/image-mounts
new "image" mount type
Diffstat (limited to 'pkg/specgen/specgen.go')
-rw-r--r-- | pkg/specgen/specgen.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go index fa4af7b2b..d68f55402 100644 --- a/pkg/specgen/specgen.go +++ b/pkg/specgen/specgen.go @@ -214,6 +214,9 @@ type ContainerStorageConfig struct { // Overlay volumes are named volumes that will be added to the container. // Optional. OverlayVolumes []*OverlayVolume `json:"overlay_volumes,omitempty"` + // Image volumes bind-mount a container-image mount into the container. + // Optional. + ImageVolumes []*ImageVolume `json:"image_volumes,omitempty"` // Devices are devices that will be added to the container. // Optional. Devices []spec.LinuxDevice `json:"devices,omitempty"` @@ -476,6 +479,19 @@ type OverlayVolume struct { Source string `json:"source,omitempty"` } +// ImageVolume is a volume based on a container image. The container image is +// first mounted on the host and is then bind-mounted into the container. An +// ImageVolume is always mounted read only. +type ImageVolume struct { + // Source is the source of the image volume. The image can be referred + // to by name and by ID. + Source string + // Destination is the absolute path of the mount in the container. + Destination string + // ReadWrite sets the volume writable. + ReadWrite bool +} + // PortMapping is one or more ports that will be mapped into the container. type PortMapping struct { // HostIP is the IP that we will bind to on the host. |