[英]docker could not mount the linux destination /
docker run -v /Users/xx/var/temp:/ -it alpine bash
But it tips: 但提示:
invalid mount config for type bind: invalid specification: destination can't be /
Why the alpine host directory could not mount? 为什么高山主机目录无法挂载?
Docker won't permit you to bind a host directory or volume to root ( /
) inside a container. Docker不允许您将主机目录或卷绑定到容器内的根(
/
)。 You'll need to bind it at a subdirectory, eg: 您需要将其绑定到子目录,例如:
docker run -v /Users/xx/var/temp:/var/temp -it alpine bash
This would make the directory available at /var/temp
inside the container. 这将使目录在容器内的
/var/temp
可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.