Closed giuseppe closed 6 years ago
So if I am running docker in a container with /host mounted and a user on the host says
docker run -v /var/lib/mariadb:/var/lib/mariadb ...
You will get /host/var/lib/mariadb:/var/lib/mariadb mounted?
We would need something similar to this in CRI-o also. I think you should add the above explanation to your PR.
So if I am running docker in a container with /host mounted and a user on the host says
docker run -v /var/lib/mariadb:/var/lib/mariadb ...
You will get /host/var/lib/mariadb:/var/lib/mariadb mounted?
yes exactly. In this way we can have the same visibility as if running on the host.
I've amended the commit log message with this example.
does the new version look fine?
I've tested the PR with symlinks and they are correctly resolved with the /host
prefix before the mount
LGTM Do we have a PR for this in CRI-O?
not yet, I can work on it
@runcom PTAL
The CRI-O counterpart: https://github.com/kubernetes-incubator/cri-o/pull/1485
anything blocking this PR?
LGTM
we need this in branch docker-1.13.1-rhel as well @giuseppe
@runcom backport here: https://github.com/projectatomic/docker/pull/308
volume: allow a prefix for all bind mounts
Introduce a new environment variable DOCKER_BIND_MOUNT_PREFIX that is added as a prefix to the source for every bind mount. This allows Docker to run inside of a container, and be able to see the host rootfs.
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com