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
36.1k stars 1.78k forks source link

Stuck on disk is being copied between layers when running docker-osx:auto #663

Open kyngs opened 1 year ago

kyngs commented 1 year ago

Output of the command:

Linux dada 6.3.3-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sun, 21 May 2023 16:10:30 +0000 x86_64 GNU/Linux
:0
1
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p2  1,9T  947G  835G  54% /
QEMU emulator version 8.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 9.3.0
               total        used        free      shared  buff/cache   available
Mem:            62Gi       5,5Gi        31Gi       125Mi        25Gi        56Gi
Swap:          4,0Gi       1,1Gi       2,9Gi
24
egrep: warning: egrep is obsolescent; using grep -E
24
crw-rw-rw- 1 root kvm 10, 232 26. kvě 19.01 /dev/kvm
total 0
drwxrwxrwt  2 root root  60 26. kvě 18.58 .
drwxrwxrwt 21 root root 580 26. kvě 19.04 ..
srwxrwxrwx  1 root root   0 26. kvě 18.58 X0
root        1301  0.4  0.1 3167688 93120 ?       Ssl  18:58   0:01 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
kyngs       9434  0.0  0.0   9116  2496 pts/1    S+   19:04   0:00 grep dockerd
kvm:x:992:libvirt-qemu,qemu
docker:x:965:kyngs
libvirt:x:959:
libvirt-qemu:x:958:

When attempting to run:

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e GENERATE_UNIQUE=true \
    sickcodes/docker-osx:auto

the container gets stuck on:

/usr/sbin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/arch/.ssh/id_docker_osx.pub"
ssh: connect to host 127.0.0.1 port 10022: Connection refused
Disk is being copied between layers. Repeating until able to copy SSH key into OSX...

I left it doing its stuff for about an hour and it still repeated the same message.

Here are the logs (I cut them after a few of those messages above, otherwise it would have several MBs) docker.txt

billywhizz commented 7 months ago

@kyngs did you figure this out? i am having exact same issue using monterey image on ubuntu 22.04.

kyngs commented 7 months ago

Nope