@@ -541,6 +541,7 @@ type ServiceVolumeConfig struct {
541541 Bind * ServiceVolumeBind `yaml:"bind,omitempty" json:"bind,omitempty"`
542542 Volume * ServiceVolumeVolume `yaml:"volume,omitempty" json:"volume,omitempty"`
543543 Tmpfs * ServiceVolumeTmpfs `yaml:"tmpfs,omitempty" json:"tmpfs,omitempty"`
544+ Image * ServiceVolumeImage `yaml:"image,omitempty" json:"image,omitempty"`
544545
545546 Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
546547}
@@ -575,6 +576,8 @@ const (
575576 VolumeTypeNamedPipe = "npipe"
576577 // VolumeTypeCluster is the type for mounting container storage interface (CSI) volumes
577578 VolumeTypeCluster = "cluster"
579+ // VolumeTypeImage is the tpe for mounting an image
580+ VolumeTypeImage = "image"
578581
579582 // SElinuxShared share the volume content
580583 SElinuxShared = "z"
@@ -618,8 +621,9 @@ const (
618621
619622// ServiceVolumeVolume are options for a service volume of type volume
620623type ServiceVolumeVolume struct {
621- NoCopy bool `yaml:"nocopy,omitempty" json:"nocopy,omitempty"`
622- Subpath string `yaml:"subpath,omitempty" json:"subpath,omitempty"`
624+ Labels Mapping `yaml:"labels,omitempty" json:"labels,omitempty"`
625+ NoCopy bool `yaml:"nocopy,omitempty" json:"nocopy,omitempty"`
626+ Subpath string `yaml:"subpath,omitempty" json:"subpath,omitempty"`
623627
624628 Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
625629}
@@ -633,6 +637,11 @@ type ServiceVolumeTmpfs struct {
633637 Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
634638}
635639
640+ type ServiceVolumeImage struct {
641+ SubPath string `yaml:"subpath,omitempty" json:"subpath,omitempty"`
642+ Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
643+ }
644+
636645type FileMode int64
637646
638647// FileReferenceConfig for a reference to a swarm file object
0 commit comments