|
Post by account_disabled on Nov 25, 2023 3:32:22 GMT -5
From the base image. Everything in the base image directory is copied to the volume and we can mount the volume into the new container. Leave the current container exit. This time we will issue our own command rather than relying on the base image's default command. This command will display the contents of the volume without entering the data directory. You now have a copy of the directory contents of the base image. You are unlikely to want to start with Mounted this way but this may be helpful if you created your own image and want an easy Job Function Email List way to preserve the data. In the next example we will show how to share volumes between multiple containers. Sharing data between multiple containers So far we have attached volumes. To one container at a time. We often want multiple containers to be attached to the same data volume. This is relatively simple to implement but there is a key caveat. File locking is not currently supported. If multiple volumes need to be written to a container, applications running in these containers must be designed to write to the shared data store to prevent.
|
|