Docker-OSX


Recommended Posts

Hey everyone,

 

I found this amazing docker https://github.com/sickcodes/Docker-OSX and I would love to use it on my Unraid server.  I would like to keep all my jailbreaking stuff in it.  (Don't like having that software on my macbook.)  Does anyone know how to install it correctly?  

I get this error: 

Unable to init server: Could not connect: Connection refused
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize kvm: No such file or directory

Thanks!

Link to comment
  • 9 months later...

never used it, but the main hint, I think is this: 

Special thanks to @kholia for maintaining the upstream project, which Docker-OSX is built on top of: OSX-KVM.

 

Looks like the Docker is using something like nested Virtualisation inside, by enabling access by "--device /dev/kvm", so OSX can run inside the container.

 

The readme @ OSX-KVM states:

Installation Preparation
KVM may need the following tweak on the host machine to work.

echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
To make this change permanent, you may use the following command.

sudo cp kvm.conf /etc/modprobe.d/kvm.conf  # for intel boxes

 

...feels like a not-so-minor change in the unraid config, when mangle with KVM on the host side, I think.

Link to comment

Oh my god.. Not only is this container amazing, I got it to work! ☺️

 

For anyone interested, it's not too difficult. I had to set some permissions, clone the source and build the vnc-version but it works.

 

783314038_ScreenShot2021-04-07at10_15_36pm.thumb.png.b202e9128f59a28decc36da4b749b730.png

Edited by lnxd
Link to comment
  • 4 months later...
  • 4 months later...
On 4/7/2021 at 10:18 PM, lnxd said:

Oh my god.. Not only is this container amazing, I got it to work! ☺️

 

For anyone interested, it's not too difficult. I had to set some permissions, clone the source and build the vnc-version but it works.

 

783314038_ScreenShot2021-04-07at10_15_36pm.thumb.png.b202e9128f59a28decc36da4b749b730.png

Trying to get it running now, any chance you'd care to elaborate on the process? Thanks in advance!

Link to comment
  • 2 months later...
On 4/7/2021 at 8:18 AM, lnxd said:

Oh my god.. Not only is this container amazing, I got it to work! ☺️

 

For anyone interested, it's not too difficult. I had to set some permissions, clone the source and build the vnc-version but it works.

 

783314038_ScreenShot2021-04-07at10_15_36pm.thumb.png.b202e9128f59a28decc36da4b749b730.png

Can you give us more details please? I have MacInABox setup as an AirMessage server but hoping this container will be a bit lighter weight

Link to comment
  • 2 weeks later...

I'm still working to get mine set up, but the vnc container does run and stays running unlike the standard one.

Here's what I did:

 

open the terminal on your unraid machine either through the web or ssh.
 

#entirely optional.. i just wanted an easy place to dump the dockerfile temporarily
mkdir /var/tmp/docker-osx
cd /var/tmp/docker-osx

wget https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/vnc-version/Dockerfile

docker build -t docker-osx-vnc .
docker run --device /dev/kvm --device /dev/snd -p 8888:5999 -p 50922:10022 -d --privileged docker-osx-vnc:latest

 

that should get it to show up in your containers list in unraid. I didn't have to change any default settings or permissions. Just r

 

After it starts running, you will be shown a vnc password in the terminal. Copy than and then you can connect to it with VNC on port 8888. I just used RealVNC viewer to connect. Works a treat.

I'm looking at adding NoVNC support to mine later, but that will a problem for future darthcircuit to worry about.

 

 

image.thumb.png.7a5d1d9ffda2dba0e37760327e63dd75.png

Edited by darthcircuit
Link to comment
  • 7 months later...
  • 2 months later...

This are the commands I use to have ventura and to get iMessage working. I left SERIAL, BOARD_SERIAL, UUID, and MAC_ADDRESS empty as thats specific to each user. Check this out to get those generated

 

I didn't use the vnc version mentioned in an earlier post here. Idk what difference it makes, but everything works fine for me. VNC included. 

mkdir /var/tmp/docker-osx
cd /var/tmp/docker-osx

wget https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/Dockerfile

docker build -t docker-osx --build-arg VERSION=13.0 --build-arg SIZE=200G .

Then run this after the docker build

docker run -i \
	--device /dev/kvm \
    --device /dev/snd \
	--name='Docker-OSX' \
	-d --privileged \
	-p 50922:10022 \
	-p 8888:5999 \
	-v /tmp/.X11-unix:/tmp/.X11-unix \
	-e "DISPLAY=${DISPLAY:-:0.0}" \
	-e RAM=6 \
	-e NETWORKING=vmxnet3 \
    -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" \
	-e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist \
    -e GENERATE_SPECIFIC=true \
    -e DEVICE_MODEL="iMac20,2" \
    -e SERIAL="" \
    -e BOARD_SERIAL="" \
    -e UUID="" \
    -e MAC_ADDRESS="" \
	sickcodes/docker-osx:ventura

 

I was wondering if anyone can get ^ this translated into a dockerMan xml to be used on community apps?

Edited by Abhi
  • Like 2
Link to comment
  • 3 weeks later...

I wasn't able to get the macosinabox to ever work (not sure if it's because I have an X5660 machine?)  But I did get this dockerized version to work relatively easily.  I'm curious, though -- does anyone know how we can build this to its own image or disk?  It adds at least 20gb to my docker.img file and doesn't seem to survive blowing that up and starting over once you get the image installed?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.