8.2 Managing Container Volume Data

Docker supports several mechanisms for data storage and persistence. One such mechanism of persisting container data is by using shared volumes in containers.

The examples used in this guide assumes that you create and use shared volumes. For example, create a shared volume called /data on your Docker host.

mkdir /data

The shared volume created requires permissions. use the following command to provide:

chmod -R 777 /data

However, you can use other volumes that Docker supports. For more information, see Docker documentation.

NOTE:Ensure that you have read-write permissions for the shared volumes.