0

I have a Docker installation inside a VM, which has access to 64 GiB SSD and 1 TiB HDD, these live on RAID controllers outside the VM.

Now I'd like to keep images that are used by active containers on the SSD, and inactive images on HDD. Is there a way to instruct dockerd to compress inactive images after a while and move them out to separate cheaper storage, e.g. by having it automatically push to a registry and deleting the image locally?

Simon Richter
  • 3,317
  • 19
  • 19
  • I don't think there have some think as you want, docker have a garbage collector but it is for cleanup blob do not have any reference to any manifest. Maybe for go near your goal you can use different mount point for volumes and images data. IMHO use the fast access storage (SSD) for data frequently accessed (like a mysql database, website content etc. etc.) and the slow access (HDD) for more static content like the docker images. Separate the container images as you want I think is a kind of unnecessary. – AtomiX84 Jul 27 '20 at 17:33
  • or you can go at a lower level of abstraction and use the SSD as a cache to the HDD, like are doing hybrid disks, but implemented on the OS rather than on the disk. Would probably require backing up data and reformatting. https://www.kernel.org/doc/Documentation/bcache.txt – A.B Jul 28 '20 at 18:55

0 Answers0