Reputation: 47
How do multiple containers(create from same image) access the directory(packaged in the image) in other container? There are some ways not elegant:
I've browsed this problem [https://stackoverflow.com/questions/29550736/can-i-mount-docker-host-directory-as-copy-on-write-overlay], I don't want containers to run in privileged mode. Is there a better idea?
Upvotes: 0
Views: 2042
Reputation: 9384
Per design one container cannot access the files inside another container. You will need to store the data outside of a container, then mount it via volume mount or bind mount. Alternatively you could try to perform some NFS/SMB/... mount of shared storage inside the container.
This is completely independent from running a container in host mode.
Upvotes: 3