Merge pull request #5833 from vvoland/subpath-swarm-fix

cli/compose: Handle Volume Subpath
This commit is contained in:
Sebastiaan van Stijn 2025-02-17 12:54:24 +01:00 committed by GitHub
commit 88a019a9bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -67,6 +67,7 @@ func handleVolumeToMount(
if volume.Volume != nil {
result.VolumeOptions.NoCopy = volume.Volume.NoCopy
result.VolumeOptions.Subpath = volume.Volume.Subpath
}
if stackVolume.Name != "" {

View File

@ -410,7 +410,8 @@ type ServiceVolumeBind struct {
// ServiceVolumeVolume are options for a service volume of type volume
type ServiceVolumeVolume struct {
NoCopy bool `mapstructure:"nocopy" yaml:"nocopy,omitempty" json:"nocopy,omitempty"`
NoCopy bool `mapstructure:"nocopy" yaml:"nocopy,omitempty" json:"nocopy,omitempty"`
Subpath string `mapstructure:"subpath" yaml:"subpath,omitempty" json:"subpath,omitempty"`
}
// ServiceVolumeImage are options for a service volume of type image