Could someone explain or link an article that explain about Docker 'sizes' ?
For example - I pulled some Windows based containers:
docker system df --verbose
Images space usage:
REPOSITORY TAG IMAGE ID CREATED SIZE SHARED SIZE UNIQUE SIZE CONTAINERS
mcr.microsoft.com/windows/servercore 1909-amd64 8116ea20e860 3 weeks ago 5.509GB 5.509GB 0B 0
mcr.microsoft.com/dotnet/framework/aspnet 4.8-windowsservercore-1909 eff771fe260f 3 weeks ago 7.523GB 7.523GB 0B 0
mcr.microsoft.com/windows/servercore ltsc2019 31902e4b25a6 4 weeks ago 5.212GB 0B 5.212GB 0
mcr.microsoft.com/powershell lts-windowsservercore-2004 7c3eedbd9958 6 weeks ago 4.84GB 0B 4.84GB 0
mcr.microsoft.com/dotnet/framework/sdk 4.8 27c31113cb5e 3 months ago 8.667GB 0B 8.667GB 0
microsoft/mssql-server-windows-developer 2017-GA 454b8faa6c43 3 years ago 11.55GB 0B 11.55GB 0
Containers space usage:
CONTAINER ID IMAGE COMMAND LOCAL VOLUMES SIZE CREATED STATUS NAMES
db7868c7480c mcr.microsoft.com/powershell "cmd" 0 0B 4 seconds ago Exited (0) 1 second ago happy_agnesi
Local Volumes space usage:
VOLUME NAME LINKS SIZE
721e8ed501b31c35f3d847b09189ce21a1c33c32b0daff48fa2a17e57c92afda 0 0B
73f678eec23d645575b96df63d48c9b3c7b3c379bd11f01d12d6fc0a7180fa2d 0 0B
e1e165e9776dda6afb73ba8af79e337f6ef19268935fdf485aead0942bb5934d 0 0B
3210cffd7ef3a592487b69695338448cb9aa31917c2dc2c25e628e866a71ba6a 0 0B
Build cache usage: 0B
CACHE ID CACHE TYPE SIZE CREATED LAST USED USAGE SHARED
So as I understand from data above for Docker image mcr.microsoft.com/windows/servercore for example:
- I need around
5.509GBon my physical hard-disk ? - Once I start the image
docker run -d .....does this size stacked up ? So 2 running containers of above image will take around5.509 Gb + 5.509 Gb = 11.018 Gbon my physical hard-disk ? - Most of the layers of
mcr.microsoft.com/dotnet/framework/aspnetbased on layers ofmcr.microsoft.com/windows/servercoreimage - so does it have any impact ondocker pushcommand (to private repo) ? Any impact ondocker pullcommand ? - Inside the container I write a lot of logs (Gigabytes of logs). It is not something virtual - it should also take space on my physical hard-disk ? (I known it will be deleted once container stopped but the question about
runningstate) - is there any place/command where I could see this size ? Could I limit this size on Windows images ? - Any gotchas about physical disk space using that I forgot ? Stopped containers usage/holding space?
- A little bit explanation about
memoryof running container: it not shared between containers (?) so let say that running 100 memory hungry containers will effectively eat all physical memory on my computer and then what ? Running new container will be denied ? Everything gonna freeze ? Any tools to prevent this ?