Skip to content

Instantly share code, notes, and snippets.

@bgadrian
Created November 23, 2019 18:32
Show Gist options
  • Save bgadrian/b2bd4ca1bdd4c327ecefb7bfe6395502 to your computer and use it in GitHub Desktop.
Save bgadrian/b2bd4ca1bdd4c327ecefb7bfe6395502 to your computer and use it in GitHub Desktop.
Docker change the data directory (Images, containers) on Ubuntu
According to the official documentation, as of Feb 2019, there are no --graph, -g options. These were renamed to the single argument --data-root.
vim /lib/systemd/system/docker.service so that the ExecStart takes into consideration that argument
ExecStart=/usr/bin/dockerd --data-root /mnt/data/docker -H fd://
systemctl daemon-reload
service docker restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment