mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
Use SSH only without X11 #52
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shekohex on GitHub (Jul 3, 2020).
Great project, I have a use case where I need the VM with SSH only without GUI/X11 like in a CI/CD for example.
is that supported?
also for example, if I want to use this in
Windows WSL 2I had to install or configure X11, which in my use case isn't needed at all. is there an easier way?@sickcodes commented on GitHub (Jul 4, 2020):
Jump into the VNC folder and build that version :)
Edit for anyone reading https://github.com/sickcodes/Docker-OSX/blob/master/vnc-version/Dockerfile
@shekohex commented on GitHub (Jul 4, 2020):
I'll try that tonight :)
I'll close it now, if I needed something I'll reopen or make a new issue.
@shekohex commented on GitHub (Jul 12, 2020):
Hey, it's me again, I successfully installed it in docker in windows using WSL2 with KVM Enabled Kernel, it works and I'm using it from SSH most of the time.

But, is there is a way that I could skip this screen? it requires me to open vnc and choose the correct drive in my case it is called
INTERNALwhich is macOS is installed.I need when the container started up it choose it automatically or with timeout as we used in normal Hackintosh setup.
Here a screenshot of what I'm talking about.
@shekohex commented on GitHub (Jul 12, 2020):
I found #53 to be related to my comment above, I used Open Core Configurator to mount the EFI and edit the
config.plistfrom #53 but seems that nothing changed, and nothing has been saved, am I missing something?UPDATE:
I tried to restart without shutting down, and it worked but If I turned off the container and turned it on again any changes is get deleted! is that mean that I'm editing on a RO file?
@daraul commented on GitHub (Jul 13, 2020):
@shekohex did you check your stopped containers? (
docker ps -a)I just had to start the container with
docker start $containerName.@shekohex commented on GitHub (Jul 13, 2020):
@daraul Hey, I'm using a
docker-compose.ymlfileand I use
docker-compose start osxordocker-compose stop osx@daraul commented on GitHub (Jul 13, 2020):
I'm not sure why the container might have been reset, then. That's unusual.
@shekohex commented on GitHub (Jul 13, 2020):
My data is saved, everything is saved my Apple ID and my settings, only changes to
EFIget reset on every boot or should I say when container startup.@daraul commented on GitHub (Jul 13, 2020):
Oh! Well I'd say that makes sense, but only because I don't know how any of that might be configured in the docker-compose file. I figure that's all in the
~/.data/osxfolder?@shekohex commented on GitHub (Jul 13, 2020):
Nothing got copied to/from
~/.data/osxand I don't know why!@sickcodes commented on GitHub (Jul 27, 2020):
Hey mate did you get back into the container? If so feel free to close the issue :)
@bryanjtc commented on GitHub (Jan 5, 2022):
@shekohex Hi, I'm trying to use your docker-compose.yml file with the official Dockerfile file and pulling the latest docker-osx.
I ran into some errors. Here's the full output. Can you help? I know very little of docker, so if you can explain in detail it's better for me.
PS C:\Projects\macos> docker-compose up osx
[+] Running 2/2
Attaching to osx
osx | ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
osx | ++ id -u
osx | ++ id -g
osx | + sudo chown 1000:1000 /dev/kvm
osx | _XSERVTransmkdir: Mode of /tmp/.X11-unix should be set to 1777
osx | _XSERVTransmkdir: this may cause subsequent errors
osx | _XSERVTransSocketCreateListener: failed to bind listener
osx | _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
osx | _XSERVTransMakeAllCOTSServerListeners: failed to create listener for unix
osx |
osx | Xvnc TigerVNC 1.12.0 - built Nov 13 2021 18:03:45
osx | Copyright (C) 1999-2021 TigerVNC Team and many others (see README.rst)
osx | See https://www.tigervnc.org for information on TigerVNC.
osx | Underlying X server release 12009000, The X.Org Foundation
osx |
osx |
osx | Wed Jan 5 04:27:23 2022
osx | vncext: VNC extension running!
osx | vncext: Listening for VNC connections on all interface(s), port 5999
osx | vncext: created VNC server for screen 0
osx | ++ id -u
osx | ++ id -g
osx | + sudo chown -R 1000:1000 /dev/snd
osx | + true
osx | +
osx | +
osx | ++ id -u
osx | ++ id -g
osx | + sudo chown -R 1000:1000 /dev/snd
osx | + true
osx | + exec qemu-system-x86_64 -m 4000 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check, -machine q35,accel=kvm:tcg -smp 4,cores=4 -usb -device usb-kbd -device usb-tablet -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -drive if=pflash,format=raw,readonly=on,file=/home/arch/OSX-KVM/OVMF_CODE.fd -drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd -smbios type=2 -audiodev alsa,id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2 -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 -drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900, -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 -monitor stdio -boot menu=on -vga vmware
osx | QEMU 6.2.0 monitor - type 'help' for more information
osx | (qemu) ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
osx | ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
osx | ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
osx | ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
osx | alsa: Reason: No such file or directory
osx | ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
osx | ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
osx | ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
osx | ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
osx | ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
osx | alsa: Could not initialize DAC
osx | alsa: Failed to open
default': osx | alsa: Reason: No such file or directory osx | audio: Failed to create voicedac'osx | ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
osx | ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
osx | ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
osx | ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
osx | ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
osx | alsa: Could not initialize ADC
osx | alsa: Failed to open
default': osx | alsa: Reason: No such file or directory osx | ALSA lib confmisc.c:855:(parse_card) cannot find card '0' osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory osx | ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory osx | ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name osx | ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory osx | ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory osx | ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default osx | alsa: Could not initialize ADC osx | alsa: Failed to opendefault':osx | alsa: Reason: No such file or directory
osx | audio: Failed to create voice `adc'
@praneetloke commented on GitHub (Jan 16, 2022):
Yeah I've started seeing that same problem lately. Been trying to figure out how to get past that. It was working flawlessly until recently. Not sure if some Windows update broke this.
EDIT: just realized those
alsaerrors are normal. Basically, the container just hangs for me after printing thosealsaerror messages. There are no other error messages before thealsaones print. I think I'll open a new issue for what I am seeing.EDIT2: Never mind. It just started working again. I mean the problem was that when I tried to attach the Spice remote viewer, the Spice viewer window would not activate. Before it just started working again for me, I re-ran all the prereq commands and also did a bunch of other things all in an attempt to get things working again. Sad thing is I didn't realize the
alsaerrors were normal until much later and so I was running a bunch of commands and trying to start the container hoping for those errors to go away. The very last thing I did do was remove thenakedcontainer image that I was using and pulled it down again because I noticed there was an issue with a recent update that was rolled back. Maybe that fixed it? 🤷♂️@melroy89 commented on GitHub (Jan 28, 2022):
I think the answer for anybody finding this issue is using the naked tag:
sickcodes/docker-osx:naked