为什么/ proc / mounts在Docker共享绑定时重复?

时间:2019-12-17 10:04:26

标签: docker bind

docker + Aliyun Linux 2(内核4.9) 创建具有共享绑定安装的docker容器。覆盖挂载后,绑定挂载父目录和子目录:

  1. mkdir -p / home / admin / overlay_test / binary / home / admin / overlay_test / package111 / home / admin / overlay_test / package222 / home / admin / overlay_test / upper / home / admin / overlay_test / work < / p>

  2. mount -t overlay overlay -o Lowerdir = / home / admin / overlay_test / package111:/ home / admin / overlay_test / package222,upperdir = / home / admin / overlay_test / upper,workdir = / home / admin / overlay_test / work / home / admin / overlay_test / binary

  3. docker run -d --net = host -v / home / admin:/ home / admin:shared -v / home / admin / overlay_test:/ home / admin / overlay_test:shared docker.io/busybox睡眠1天

但是/ proc /($ pid)/ mountinfo中有2个mountinfo,/ proc / mounts中有2个重复项。我只挂载一次,有人可以告诉我为什么吗?

0 个答案:

没有答案