Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/compose/convert/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ func handleImageToMount(volume composetypes.ServiceVolumeConfig) (mount.Mount, e
if volume.Cluster != nil {
return mount.Mount{}, errors.New("cluster options are incompatible with type image")
}
if volume.Bind != nil {
result.BindOptions = &mount.BindOptions{
Propagation: mount.Propagation(volume.Bind.Propagation),
if volume.Image != nil {
result.ImageOptions = &mount.ImageOptions{
Subpath: volume.Image.Subpath,
}
}
return result, nil
Expand Down
2 changes: 1 addition & 1 deletion cli/compose/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ type ServiceVolumeVolume struct {

// ServiceVolumeImage are options for a service volume of type image
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
Expand Down