How to change docker root data directory

<p>The standard data directory used by docker is /var/lib/docker, and since this directory will store all your images, volumes, etc. it can become quite large in a relative small amount of time.</p> <p>If you want to move the docker data directory on another location you can follow the following simple steps.</p> <h1>1. Stop the docker daemon</h1> <pre> sudo service docker stop</pre> <h1>2. Add a configuration file to tell the docker daemon what is the location of the data directory</h1> <p>Create docker daemon configuration&nbsp;<em>/etc/docker/daemon.json</em>&nbsp;with following content:</p> <p><a href="https://tienbm90.medium.com/how-to-change-docker-root-data-directory-89a39be1a70b"><strong>Read More</strong></a></p>
Tags: Docker Root