Skip to content

Instantly share code, notes, and snippets.

@chorsnell
Last active March 4, 2020 12:29
Show Gist options
  • Save chorsnell/ab6a1050caa55babe8fa25b101c2a3c3 to your computer and use it in GitHub Desktop.
Save chorsnell/ab6a1050caa55babe8fa25b101c2a3c3 to your computer and use it in GitHub Desktop.

Stop docker

sudo service docker stop

Add docker config

Create /etc/docker/daemon.json

{ 
   "graph": "/path/to/your/docker" 
}

Copy docker data

sudo rsync -aP /var/lib/docker/ /path/to/your/docker

Rename docker dir

sudo mv /var/lib/docker /var/lib/docker.old

Restart docker

sudo service docker start

Test then delete old docker data

sudo rm -rf /var/lib/docker.old

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment