|
Post by Munnaf877 on Nov 25, 2023 8:06:46 GMT
Since we used the flag our container will be automatically deleted on exit. But our volume is still available. Exit We can do this by checking whether the volume exists on the system. Note that we can even view data on the host at the path listed on the mount point. But we should avoid changing them because it may cause data corruption if the application or container. Not aware of the changes. We will then start a new container and attach the verified contents of cat. In this example we created a volume, attached it to the container and verified its durability. Creating a Job Function Email List volume that survives deletion of a container In the next example we will create a volume while creating the container, delete the container and then attach the volume. The new container. We will use the command to create a new container using the base image. will provide us with a terminal and will allow us to interact with it. For clarity we will use to identify the container. flag will allow us to create a new volume we'll call it . We will use a colon to separate its name from the path in the container where the volume should be mounted.
|
|