April 1, 2023
Docker stores downloaded images, running containers, and persistent volume data in a single shared directory root on your system drive. You can customize your configuration to use an external drive, network share, or second internal disc if you need to add storage to your installation. Preparation The main part of this guide applies to Docker…

Docker stores downloaded images, running containers, and persistent volume data in a single shared directory root on your system drive. You can customize your configuration to use an external drive, network share, or second internal disc if you need to add storage to your installation.

Preparation

The main part of this guide applies to Docker Engine for Linux and Docker Desktop on Windows and Mac. You’ll need to find your Docker daemon.json file on all three platforms. This will be in one of the following locations:

  • /etc/docker/daemon.json on Linux.
  • %programdata%dockerconfigdaemon.json on Windows.
  • ~/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/etc/docker/daemon.json on Mac.

Docker advises that Windows and Mac users update the config file via the UI, instead of manually applying changes in a text editor. You can access the settings screen by heading to Preferences > Docker Engine > Edit file in the Docker Desktop interface.

Changing Your Data Directory

The location of Docker’s data directory is controlled by the data-root setting in your config file. Old Docker versions released prior to 17.06 used graph instead. You can check the version you’ve got by running the docker version…

Read Full Article Source