Docker 101 : Accessing a container's storage from another container
We use the below command, to first create a "vol-deb" volume for our containers on our host's storage:
Even if we exit our container or remove it, the volume "vol-deb" would still be accessible.
The volume "vol-deb", could also be used from another container using the below command:
The above command runs another container - ed22087d7986 - using a debian image and the volume "vol-deb".
We create another file - file1.txt -, we also notice that the file - file.txt - we created earlier in the - 3484c609bd8e - container is also there.
Comments