diff --git a/opts/mount.go b/opts/mount.go index 682717f164df..a4b5744fee77 100644 --- a/opts/mount.go +++ b/opts/mount.go @@ -175,10 +175,6 @@ func (m *MountOpt) Set(value string) error { return errors.New("type is required") } - if mount.Target == "" { - return errors.New("target is required") - } - if mount.VolumeOptions != nil && mount.Type != mounttypes.TypeVolume { return fmt.Errorf("cannot mix 'volume-*' options with mount type '%s'", mount.Type) } diff --git a/opts/mount_test.go b/opts/mount_test.go index 96d1a7357942..cacba20b57df 100644 --- a/opts/mount_test.go +++ b/opts/mount_test.go @@ -113,21 +113,6 @@ func TestMountOptErrors(t *testing.T) { doc: "empty value", expErr: "value is empty", }, - { - doc: "missing tmpfs target", - value: "type=tmpfs", - expErr: "target is required", - }, - { - doc: "missing bind target", - value: "type=bind", - expErr: "target is required", - }, - { - doc: "missing volume target", - value: "type=volume,source=/foo", - expErr: "target is required", - }, { doc: "invalid key=value", value: "type=volume,target=/foo,bogus=foo",