Merge pull request #5832 from vvoland/swarm-fix-image-subpath
cli/compose: Fix Image Subpath
This commit is contained in:
commit
b73653ef41
@ -107,9 +107,9 @@ func handleImageToMount(volume composetypes.ServiceVolumeConfig) (mount.Mount, e
|
|||||||
if volume.Cluster != nil {
|
if volume.Cluster != nil {
|
||||||
return mount.Mount{}, errors.New("cluster options are incompatible with type image")
|
return mount.Mount{}, errors.New("cluster options are incompatible with type image")
|
||||||
}
|
}
|
||||||
if volume.Bind != nil {
|
if volume.Image != nil {
|
||||||
result.BindOptions = &mount.BindOptions{
|
result.ImageOptions = &mount.ImageOptions{
|
||||||
Propagation: mount.Propagation(volume.Bind.Propagation),
|
Subpath: volume.Image.Subpath,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result, nil
|
return result, nil
|
||||||
|
@ -415,7 +415,7 @@ type ServiceVolumeVolume struct {
|
|||||||
|
|
||||||
// ServiceVolumeImage are options for a service volume of type image
|
// ServiceVolumeImage are options for a service volume of type image
|
||||||
type ServiceVolumeImage struct {
|
type ServiceVolumeImage struct {
|
||||||
Subpath bool `mapstructure:"subpath" yaml:"subpath,omitempty" json:"subpath,omitempty"`
|
Subpath string `mapstructure:"subpath" yaml:"subpath,omitempty" json:"subpath,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServiceVolumeTmpfs are options for a service volume of type tmpfs
|
// ServiceVolumeTmpfs are options for a service volume of type tmpfs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user