美文网首页
Docker Volume Propagation

Docker Volume Propagation

作者: platformer | 来源:发表于2016-02-19 22:08 被阅读0次

root@mesos002:~# mount --make-shared /

root@mesos002:~# docker run --privileged -ti  -v/root/mnt-source:/root/mnt-dest:shared --cap-add SYS_ADMIN fedora bash

[root@6795fe0ad7d6 /]# findmnt -o TARGET,PROPAGATION /root/mnt-dest

TARGETPROPAGATION

/root/mnt-dest shared

[root@6795fe0ad7d6 /]#mkdir -p /root/mnt-dest/mnt1

[root@6795fe0ad7d6 /]# cd /root/mnt-dest

[root@6795fe0ad7d6 mnt-dest]# mount --bind mnt1 mnt1

root@mesos002:~# findmnt /root/mnt-source/mnt1

TARGETSOURCEFSTYPE OPTIONS

/root/mnt-source/mnt1 /dev/disk/by-uuid/017a354d-62b9-4ca2-aca2-12df8da6c82e[/root/mnt-source/mnt1] ext4rw,relatime,errors=remount-ro,data

相关文章

网友评论

      本文标题:Docker Volume Propagation

      本文链接:https://www.haomeiwen.com/subject/sudvkttx.html