Docker-OSX icon indicating copy to clipboard operation
Docker-OSX copied to clipboard

hints to reduce image size

Open carlosen14 opened this issue 4 years ago • 5 comments

i generated the image, accept terms, get into desktop, but until here the image size was already 35GB.

my plan was to generate an image to use it on ci-cd, but with this size it is not possible :confused: , do you have any hint I could try? i am advancing with this, maybe check the opencore I saw on other issue #83 but dont know if will be able to install xcode.app and xcodebuild, the tools required to compile.

great tool btw, at least works and is faster than a virtualbox machine

carlosen14 avatar Dec 16 '20 20:12 carlosen14

Try following these instructions and see how it goes https://github.com/sickcodes/Docker-OSX#how-to-reduce-the-size-of-the-image

weskerfoot avatar Dec 18 '20 21:12 weskerfoot

I was able to get my image size down to 42 gb, which is less than the 70gb or so it was before, but if you delete enough things you could probably get it down to 20 gb or so.

weskerfoot avatar Dec 18 '20 21:12 weskerfoot

You can compress the image and it will shrink significantly in size:

qemu-img convert -c -O qcow2 larger.img smaller.img

It does not affect runtime speeds.

In addition, you can disable Automatic Updates for the system itself. This prevents it blowing out to 40GB on first boot. Literally just discovered this and I am uploading a fixed sickcodes/docker-osx:auto image as we speak.

sickcodes avatar Feb 22 '21 11:02 sickcodes

You can compress the image and it will shrink significantly in size:

qemu-img convert -c -O qcow2 larger.img smaller.img

It does not affect runtime speeds.

In addition, you can disable Automatic Updates for the system itself. This prevents it blowing out to 40GB on first boot. Literally just discovered this and I am uploading a fixed sickcodes/docker-osx:auto image as we speak.

Excelent news, will try your image and see if I can get it working on CICD

carlosen14 avatar Feb 22 '21 15:02 carlosen14

Try following these instructions and see how it goes https://github.com/sickcodes/Docker-OSX#how-to-reduce-the-size-of-the-image

Could you share the instructions again? It's no longer on the page

ju-li avatar Sep 27 '22 06:09 ju-li