0

How can I tell docker to write data elsewhere of /var/tmp ? Like specifying another path, like /opt for example.

Because I often running out of disk usage on /var file system.

The challenge is that I don't to resize /var every time I need to load or save images from the daemon.

Thanks

Suffren
  • 7
  • 2

1 Answers1

0

According to this Docker Offical Post, all you have to do is change the location in /etc/docker/daemon.json like this:

{
  "data-root": "/new/docker/data/path"
}

Have in mind that if you use tools that connect to a Docker environment, like VSCode, Portainer and many others, they might not be able to see/manage your images if you change the default value.