Change default storage location of docker containers on Ubuntu 18.04 and 18.10

This was tested on Docker version 18.09.4, build d14af54266, it includes ALL docker data.

Just edit/create a file inside /etc/docker named daemon.json and add the following:

{
"data-root": "/new_location"
}

then simply restart docker:

sudo service docker restart

Source:

https://docs.docker.com/engine/reference/commandline/dockerd/

About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in docker and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s