A
A
arruah2018-12-12 18:50:35
Docker
arruah, 2018-12-12 18:50:35

How to force Docker to store images and containers in a specified location?

I have Ubuntu 18.04 installed on a 128MB SSD. As I worked with Docker, free disk space became critically small. How can I get Docker to store all files in the specified location?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2018-12-13
@arruah

/etc/docker/daemon.json , a parameter data-root(you only need to specify it, and not copy it entirely from the docks). Lossless shift process:

  1. Create this config
  2. Stop docker
  3. Move the /var/lib/docker data to the directory specified in the config
  4. lift docker

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question