We are running a server with docker to encapsulate different functionalities. Some of these require quite large images. The server got 1 TB of SSD and 4 TB of HDD storage. I'd like to store running containers and their data on the SSD for performance but images on the HDD to preserve storage space.
I searched and found several solutions to moving the entire docker storage directory to a different volume, e.g. How to change the docker image installation directory? However, as far as I can tell this affects both images and running containers.
Poking around in /var/lib/docker/ I found almost the entire space taken up by the overlay2 directory, apparently the file system of the docker daemon. I must admit I do not fully understand how this works. I was able to reclaim about 150 GB of space by removing dangling images but could not find a way to move only the images to a different directory.
My question is how to do this or why it is not possible/reasonable. I'm rather new to docker, and would really appreciate an explanation on how the storage system actually works.