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

Stripped down image.

Open sickcodes opened this issue 4 years ago • 13 comments

Would like to make a full stripped down version.

Ideas to remove:

  • mail
  • news
  • stocks
  • images
  • logging(?)
  • store
  • screensavers etc.

Outcomes:

  • faster boot
  • smaller image size
  • faster processing
  • faster Xcode
  • faster compiling

If anyone has experience in stripping this box down, feel free to post your notes here!

sickcodes avatar Jan 25 '21 06:01 sickcodes

In my opinion, the most important stuff in an OSX research environment is safari, itunes, usb passthrough, imessage, app store, xcode and homebrew. At least with those, a lot can be done.

xtiankisutsa avatar Jan 25 '21 06:01 xtiankisutsa

I'd go further - namely not install anything that can be installed 'easily' - so keep the app store and usb passthrough, and whatever else useful that you can't also install through the app store. I'd even forgo homebrew, as much as it pains me, especially as there are competitors like "MacPorts" or "chocolatey". Remember to stay as un-opinionated as possible when non-Mac software is concerned. The basic rule that I'd follow is to not install any application if it can be installed via standard tools (which I think is a CLI or GUI interface to the app store).

jonvel avatar Jan 26 '21 21:01 jonvel

I'd go further - namely not install anything that can be installed 'easily' - so keep the app store and usb passthrough, and whatever else useful that you can't also install through the app store. I'd even forgo homebrew, as much as it pains me, especially as there are competitors like "MacPorts" or "chocolatey". Remember to stay as un-opinionated as possible when non-Mac software is concerned. The basic rule that I'd follow is to not install any application if it can be installed via standard tools (which I think is a CLI or GUI interface to the app store).

Perfect perspective, thank you for sharing that.

You're right, it should probably be reduced to the "netinstall" level and the rest can be automated by the end user from then on out.

While the original version of this project was pretty much a "netinstall", it was an absolute mission to automate, so I've just completed the install.

I agree regarding third-party projects too, especially since this is research tool.

I'll have a go at it over the next few days, if anyone has some tips on culling applications, please do let us know!

sickcodes avatar Jan 26 '21 22:01 sickcodes

So long as the post-install automation is documented (or, indeed, links to the relevant third-party docs are provided in this project's usage docs)... anecdotally, getting up and running today has been a great big whack-a-mole exercise 😅

prometheas avatar Jan 31 '21 21:01 prometheas

So long as the post-install automation is documented (or, indeed, links to the relevant third-party docs are provided in this project's usage docs)... anecdotally, getting up and running today has been a great big whack-a-mole exercise sweat_smile

Sorry I didn't spot that mistake in the documentation!

I'm always reachable on Twitter DM's if it's a more complex question regarding args or if you think there's a problem. Or feel free to post issues :)

sickcodes avatar Feb 01 '21 22:02 sickcodes

Observations so far:

  • Deleting dyld shared cache drastically extends boot time but reduces image size by 2GB
  • Using qemu-img -c reduces the image the 5GB with no noticeable drawbacks
  • Removing speech synthesis voice packs reduces image size by 500MB
  • The image must be mounted inside MacOS due to the inability to mount HFS+ on Linux. This is trivial using -e EXTRA commands
THIRD_DISK=/full/path/to/third_disk.img

docker run #...
-v "${THIRD_DISK}:/image2" \
-e "EXTRA='-device ide-hd,bus=sata.5 ,drive=ThirdDisk -drive id=ThirdDisk,if=none,file=_PATH:/image2,format=qcow2" \

  • Homebrew adds Xcode command line tools increasing disk size by at least 1GB. I will not be adding this as per valid points made above by @jonvel

I will test these changes and more today and then replace the cloud image with the new semi stripped down image. This will return the cloud docker builds to a passing state as of current I am required to manually build the images and upload them. I have automated that process itself also using DigitalOcean API, however I do not wish to be the Automator, I want hub.docker.com to build the images for us.

Should I cryptographically sign each image from here on on out?

sickcodes avatar Feb 08 '21 10:02 sickcodes

In my opinion, the most important stuff in an OSX research environment is safari, itunes, usb passthrough, imessage, app store, xcode and homebrew. At least with those, a lot can be done.

All of these except for usb and homebrew I will probably have ready soon. Whichever apps can be reinstalled, might be the way to go.

sickcodes avatar Feb 14 '21 23:02 sickcodes

Does it include the fast XCode version? If so I can do tests if you need a volunteer.

Silfalion avatar Feb 18 '21 17:02 Silfalion

Does it include the fast XCode version? If so I can do tests if you need a volunteer.

I don't know much about Xcode, sure I would love to see tests

sickcodes avatar Feb 19 '21 03:02 sickcodes

Does it include the fast XCode version? If so I can do tests if you need a volunteer.

I don't know much about Xcode, sure I would love to see tests

Sorry, hadn't see your comment earlier. Sure, what would you want me to test?

Silfalion avatar Feb 22 '21 06:02 Silfalion

Sure, I'm testing all this week ripping the guts out of the system.

Are you referring to Xcode command line tools?

sickcodes avatar Feb 22 '21 11:02 sickcodes

Sounds promising. No, to the GUI version. Did you mean build time speed at the beginning of this issue?

Silfalion avatar Feb 22 '21 12:02 Silfalion

Any progress on the stripped down version?

gitcomit8 avatar Nov 28 '22 04:11 gitcomit8