I have a Windows server 2019 server with ~770GB ram and 2TB SSD which I do not utilize fully in my CI therefore I decided to create a ramdisk with ~50% of the available memory to speedup my builds.
Since all my pipelines run in docker, I wanted to configure the ramdisk to mount the virtual disk inside the docker home folder where the container runtime data will be stored.
Initially, I thought that this location would be the <DOCKER_HOME>\container
folder but turns out that the actual file system and layers are stored in <DOCKER_HOME>\windowsfilter
folder. The problem is, this folder contains not only the container data, but also the images data. This creates 2 main problems,
- my images will be gone if the server is rebooted and you know how big the windows docker images can get.
- the more images I have, the more space they will take inside the RAM and my 2TB disk is of no real use. The ramdisk size is more than enough for the running containers at any time but adding the images to it, I will very soon run out of space.
My question is, is there some kind of a docker configuration or a trick that I can use to separate the date of the images from those of containers? Any other solutions I should look at? What do you recommend? Thanks in advance.