Skip to content

Commit 88a019a

Browse files
authored
Merge pull request docker#5833 from vvoland/subpath-swarm-fix
cli/compose: Handle Volume Subpath
2 parents b73653e + add32e4 commit 88a019a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cli/compose/convert/volume.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func handleVolumeToMount(
6767

6868
if volume.Volume != nil {
6969
result.VolumeOptions.NoCopy = volume.Volume.NoCopy
70+
result.VolumeOptions.Subpath = volume.Volume.Subpath
7071
}
7172

7273
if stackVolume.Name != "" {

cli/compose/types/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ type ServiceVolumeBind struct {
410410

411411
// ServiceVolumeVolume are options for a service volume of type volume
412412
type ServiceVolumeVolume struct {
413-
NoCopy bool `mapstructure:"nocopy" yaml:"nocopy,omitempty" json:"nocopy,omitempty"`
413+
NoCopy bool `mapstructure:"nocopy" yaml:"nocopy,omitempty" json:"nocopy,omitempty"`
414+
Subpath string `mapstructure:"subpath" yaml:"subpath,omitempty" json:"subpath,omitempty"`
414415
}
415416

416417
// ServiceVolumeImage are options for a service volume of type image

0 commit comments

Comments
 (0)