Reputation: 29739
I know that i am able to specify a volume which is read-only on the container:
docker run -v /path/on/host:/path/on/container:ro my/image
But I need the opposite behavior: A folder that is read-write on the container and read-only on the host. Is that possible?
Background: I want to tell my IDE the path of the python executable which is in a virtualenv in a docker container.
Upvotes: 1
Views: 2512
Reputation: 3588
I don't believe this is possible using bind-mounts alone. Instead I would recommend using filesystem permissions on the host.
Another option is having the container export the path to the network using NFS/SMB/etc and have that mounted by the host -- though this is trickier.
Upvotes: 1