Should I need run docker command in X11 environment? #125

Closed
opened 2025-12-28 23:25:31 +01:00 by adam · 4 comments
Owner

Originally created by @smoothdvd on GitHub (Mar 12, 2021).

OS related issued, please help us identify the issue by posting the output of this

NAME="Ubuntu"
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       916G  857G   13G  99% /
QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.14)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 6.0.0
              total        used        free      shared  buff/cache   available
Mem:           15Gi       2.9Gi       3.3Gi       153Mi       9.3Gi        12Gi
Swap:         2.0Gi       277Mi       1.7Gi
8
8
crw-rw----+ 1 root kvm 10, 232 Mar 12 09:50 /dev/kvm
total 88K
drwxrwxrwt   2 root root 4.0K Feb 27 15:41 .
drwxrwxrwt 115 root root  80K Mar 12 09:50 ..
srwxrwxrwx   1 gdm  gdm     0 Feb 27 15:41 X0
root        1026  0.2  0.3 2632976 57012 ?       Ssl  Feb27  45:52 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
alex     2615839  0.0  0.0   9032   740 pts/2    S+   09:52   0:00 grep --color=auto dockerd
kvm:x:130:alex
libvirt:x:131:alex
libvirt-qemu:x:64055:libvirt-qemu
libvirt-dnsmasq:x:132:
docker:x:997:alex

When I run docker command in remote ssh, I get following message:

docker run -it     --device /dev/kvm  --device /dev/snd   -p 50922:10022     sickcodes/docker-osx:big-sur

touch: cannot touch '': No such file or directory
chown: cannot access '': No such file or directory
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 
nohup: appending output to 'nohup.out'
Unable to init server: Could not connect: Connection refused
QEMU 5.2.0 monitor - type 'help' for more information
(qemu) ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `adc'
gtk initialization failed
Originally created by @smoothdvd on GitHub (Mar 12, 2021). # OS related issued, please help us identify the issue by posting the output of this ``` NAME="Ubuntu" PRETTY_NAME="Ubuntu 20.04.2 LTS" VERSION_CODENAME=focal UBUNTU_CODENAME=focal Filesystem Size Used Avail Use% Mounted on /dev/sda2 916G 857G 13G 99% / QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.14) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers libvirtd (libvirt) 6.0.0 total used free shared buff/cache available Mem: 15Gi 2.9Gi 3.3Gi 153Mi 9.3Gi 12Gi Swap: 2.0Gi 277Mi 1.7Gi 8 8 crw-rw----+ 1 root kvm 10, 232 Mar 12 09:50 /dev/kvm total 88K drwxrwxrwt 2 root root 4.0K Feb 27 15:41 . drwxrwxrwt 115 root root 80K Mar 12 09:50 .. srwxrwxrwx 1 gdm gdm 0 Feb 27 15:41 X0 root 1026 0.2 0.3 2632976 57012 ? Ssl Feb27 45:52 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock alex 2615839 0.0 0.0 9032 740 pts/2 S+ 09:52 0:00 grep --color=auto dockerd kvm:x:130:alex libvirt:x:131:alex libvirt-qemu:x:64055:libvirt-qemu libvirt-dnsmasq:x:132: docker:x:997:alex ``` When I run docker command in remote ssh, I get following message: ``` docker run -it --device /dev/kvm --device /dev/snd -p 50922:10022 sickcodes/docker-osx:big-sur touch: cannot touch '': No such file or directory chown: cannot access '': No such file or directory ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 nohup: appending output to 'nohup.out' Unable to init server: Could not connect: Connection refused QEMU 5.2.0 monitor - type 'help' for more information (qemu) ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `dac' ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `adc' gtk initialization failed ```
adam closed this issue 2025-12-28 23:25:31 +01:00
Author
Owner

@Otus9051 commented on GitHub (Mar 12, 2021):

You may try doing it from X11

@Otus9051 commented on GitHub (Mar 12, 2021): You may try doing it from X11
Author
Owner

@Otus9051 commented on GitHub (Mar 12, 2021):

Also try doing with sudo or as root

@Otus9051 commented on GitHub (Mar 12, 2021): Also try doing with sudo or as root
Author
Owner

@sickcodes commented on GitHub (Mar 12, 2021):

Big Sur isn't headless, and dockerhub won't take the Big Sur auto image because it's 40GB 😂

Use :auto but it's Catalina

Run Big Sur with X then switch over to naked (headless) once you're happy with your image

@sickcodes commented on GitHub (Mar 12, 2021): Big Sur isn't headless, and dockerhub won't take the Big Sur auto image because it's 40GB 😂 Use :auto but it's Catalina Run Big Sur with X then switch over to naked (headless) once you're happy with your image
Author
Owner

@smoothdvd commented on GitHub (Mar 12, 2021):

@sickcodes OK.

@smoothdvd commented on GitHub (Mar 12, 2021): @sickcodes OK.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#125