sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
https://hub.docker.com/r/sickcodes/docker-osx
GNU General Public License v3.0
45.35k stars 2.4k forks source link

Light image ? #103

Open rockandska opened 3 years ago

rockandska commented 3 years ago

Hi,

Do you have plans to provide the ability to have a lightweight image containing only the terminal without X layer?

I'm looking for a way to test shell scripts on a native macos installation through docker but never found a project who provide this possibility.

Best regards,

sickcodes commented 3 years ago

The recovery shell has a terminal with limited capabilities, have you tested the shell in the installation disc?

sickcodes commented 3 years ago

If so, and you think it's a good idea, i can create another image

L-U-C-K-Y commented 3 years ago

Just found this project, looks really interesting!

I would also be interested in a “light image” that I could use as a CI/CD machine to build apps.

Many thanks for your work and the great idea.

Edit: Saw a similar use-case is being tracked here: https://github.com/sickcodes/Docker-OSX/issues/83

sickcodes commented 3 years ago

Unfortunately to run the OS you must accept the EULA.

After the EULA you can run docker commit and duplicate your custom image as many times as you like.

Then you can use that image as your CI/CD tool :)

rockandska commented 3 years ago

The recovery shell has a terminal with limited capabilities, have you tested the shell in the installation disc?

Did not try it yet. When you say with limited capabilities, what are they ? Long time ago I tried to build a minimal shell with tools from https://opensource.apple.com/ but I abandoned it and is the reason why I'm still looking for a way to test shell under macos in a convenient way.

sickcodes commented 3 years ago

@rockandska Interesting, you can test the limited bash 3.0 shell inside the OSX recovery image in this project which might be able to do adapted to run a minimal environment.

sickcodes commented 3 years ago

Working on this. Dropbear or something inside the recovery disk would be nice

sickcodes commented 3 years ago

Working on slimming all images down currently.

Most importantly is an SSHable recovery image which is sub 1GB!

sickcodes commented 3 years ago

Having MAJOR issues slimming APFS however on Big Sur.

rockandska commented 3 years ago

Thanks for the follow-up

weskerfoot commented 3 years ago

Having MAJOR issues slimming APFS however on Big Sur.

Is the issue that it doesn't properly support TRIM on VMs?

You can apparently run into a bug that causes it to boot really slowly https://forums.macrumors.com/threads/new-ssd-formatted-as-apfs-trim-always-slow-boot-and-performance.2237883/

sickcodes commented 3 years ago

Not worried about speed, worried about cutting image size. The Big Sur is 40GB, were you able to cut it down?

weskerfoot commented 3 years ago

Not worried about speed, worried about cutting image size. The Big Sur is 40GB, were you able to cut it down?

I haven't updated to big sur yet, will see if I have time to try it out next week

sickcodes commented 3 years ago

It's insane, APFS only and can't seem to shrink it. Might have to use non-qcow instead actually

sickcodes commented 3 years ago

Lol

40gb

weskerfoot commented 3 years ago

Wow, quality software Apple :(

On Fri., Mar. 19, 2021, 5:54 p.m. sickcodes, @.***> wrote:

Lol

[image: 40gb] https://user-images.githubusercontent.com/65906298/111845885-a453f080-88fd-11eb-90db-06d218985d3c.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sickcodes/Docker-OSX/issues/103#issuecomment-803155732, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC4L35CNNKDEWECNS5XIULTEPB2HANCNFSM4TMVE7MA .

sickcodes commented 3 years ago

All good fixed it after installation in https://github.com/sickcodes/Docker-OSX/issues/210

sickcodes commented 3 years ago

Some optimizations can be performed here to make your image smaller https://github.com/sickcodes/osx-optimizer

biemster commented 2 years ago

Working on slimming all images down currently.

Most importantly is an SSHable recovery image which is sub 1GB!

Do you have an update on the latter @sickcodes ? Would be extremely useful if it has AOSKit and can login to iCloud to research anisette data!