on debian, docker.io
is docker “the debian way” - i.e., dependencies are shareable packages.
from you can set the docker directory to another one - but only if that alternate is also on the same filesystem. (begging the question: why even bother?)
$ sudo systemctl stop docker.socket $ sudo systemctl stop docker.service
/lib/systemd/system/docker.service
- find ExecStart=
and put a -g <dir>
before the -H, like so: ExecStart=/usr/bin/dockerd -g /new/path/docker -H fd://
chown -R :docker
on it)$ sudo systemctl daemon-reload $ sudo systemctl start docker
ps aux | grep -i docker | grep -v grep
you should see the -g you added. then you can go into the directory and make sure docker put all its shit there.
from you can recursively mount any linux directory in any other - but docker trips over not being allowed to create hard links, and fails.