Hacker symbol

November 11, 2019 ~ 1 min read

Docker data directory

Edit the docker.service. You can find out by the path of the systemd file by running systemc status docker and it should have the path at the top of the output.

Then change the line starting with ExecStart: which has the dockerd command. Add the --data-root flag to make it look this now:

ExecStart: /usr/bin/dockerd --data-root /mnt/docker -H fd:// --containerd=/run/containerd/containerd.sock

Sebastian BolaƱos

Hi, I'm Sebastian. I'm a software developer from Costa Rica. You can follow me on Twitter. I enjoy working on trustless systems.