1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

daemon/mountVolumes: no need to specify fstype

For bind mounts, fstype argument to mount(2) is ignored.
Usual convention is either empty string or "none".

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 4e65b17ac4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Kir Kolyshkin 2019-04-09 11:46:26 -07:00 committed by Sebastiaan van Stijn
parent 8b328aa9b4
commit d2b470142c
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 1 additions and 6 deletions

View file

@ -1,5 +0,0 @@
// +build linux freebsd
package daemon // import "github.com/docker/docker/daemon"
const bindMountType = "bind"

View file

@ -142,7 +142,7 @@ func (daemon *Daemon) mountVolumes(container *container.Container) error {
writeMode = "rw"
}
opts := strings.Join([]string{bindMode, writeMode}, ",")
if err := mount.Mount(m.Source, dest, bindMountType, opts); err != nil {
if err := mount.Mount(m.Source, dest, "", opts); err != nil {
return err
}