1 year ago

#345077

test-img

David Ragimov

How to increase windows docker container disk space

i am trying to build a windows servercore image with scaled up disk space

when i try

docker run -it --storage-opt size=50G mcr.microsoft.com/windows/servercore:ltsc2019 powershell

it does work and scales up the disk space within the container so if i run this command before and after against the same windows servercore container i get different results:

Get-CimInstance -ClassName Win32_LogicalDisk

in the regular windows container ( not scaled up with --storage-opt ) i see that the size is 30GB

in the scaled up container ( scaled up with --storage-opt size=50GB ) i do get 50GB in the disk size

when i try to run

docker commit <WINDOWS_SCALED_UP_CONTAINER> scaled_up_tag

i get an error "windows containers does not support commit"

the best solution for my specific problem is to scale up the windows image disk space using a build line in the Dockerfile

any suggetstions?

docker

containers

docker-for-windows

diskspace

windows-container

0 Answers

Your Answer

Accepted video resources