SDRangel in Docker: first working GUI solution

This commit is contained in:
f4exb 2019-03-05 15:25:52 +01:00
parent 26b8751d61
commit 93a2823fcc
3 changed files with 16 additions and 1 deletions

View File

@ -72,6 +72,9 @@ RUN sudo apt-get update && sudo apt-get -y install \
libopus-dev \
libavahi-client-dev
# This is the first step to allow sharing pulseaudio with the host
COPY pulse-client.conf /etc/pulse/client.conf
# CM256cc
RUN cd /opt/build \
&& git clone https://github.com/f4exb/cm256cc.git \

View File

@ -1,13 +1,16 @@
#!/bin/sh
COMMAND="/bin/bash"
USER_UID=$(id -u)
xhost +si:localuser:root # allow connections to X server
xhost +si:localuser:${USER}
#docker run --privileged -e "DISPLAY=unix:0.0" -p 50022:22 -v="/tmp/.X11-unix:/tmp/.X11-unix:rw" -v="/tmp/debug:/opt/build/sdrangel/debug:rw" -i -t --rm sdrangel/bionic:linux_nvidia $COMMAND
docker run -it --rm --privileged \
-e "PULSE_SERVER=unix:/run/user/1000/pulse/native" \
-e "DISPLAY=unix:0.0" \
-p 50022:22 \
-v="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
-v="/home/${USER}/.config/f4exb:/home/sdr/.config/f4exb:rw" \
-v="/home/${USER}/.config:/home/sdr/.config:rw" \
-v="/run/user/${USER_UID}/pulse:/run/user/1000/pulse" \
sdrangel/bionic:linux_nvidia $COMMAND

View File

@ -0,0 +1,9 @@
# Connect to the host's server using the mounted UNIX socket
default-server = unix:/run/user/1000/pulse/native
# Prevent a server running in the container
autospawn = no
daemon-binary = /bin/true
# Prevent the use of shared memory
enable-shm = false