├── Dockerfile └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:bionic 2 | 3 | LABEL maintainer "Bea Hughes " 4 | 5 | RUN apt-get update && apt-get install -y --no-install-suggests --no-install-recommends \ 6 | curl gnupg2 apt-transport-https ca-certificates libx11-xcb1 libasound2 libgtk-3-0 libgbm1 libdrm2 \ 7 | && curl -s https://updates.signal.org/desktop/apt/keys.asc > signal-repo.key \ 8 | && apt-key add signal-repo.key \ 9 | && echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" > \ 10 | /etc/apt/sources.list.d/signal-xenial.list \ 11 | && apt-get update \ 12 | && apt-get install --no-install-recommends -y signal-desktop 13 | 14 | RUN groupadd -r signal && useradd --no-log-init -m -g signal signal 15 | 16 | RUN chown root:root /opt/Signal/chrome-sandbox && chmod 4755 /opt/Signal/chrome-sandbox 17 | 18 | USER "signal" 19 | 20 | WORKDIR "/home/signal" 21 | 22 | ENTRYPOINT /opt/Signal/signal-desktop --quiet >/dev/null 2>&1 23 | # ENTRYPOINT /opt/Signal/signal-desktop 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-signal-desktop 2 | 3 | Whisper Systems Signal Desktop in a container. 4 | 5 | With more minimal exposure. Only mounts your Signal config, not the entire homedir. If you want to save images off of signal or whatever, you're relatively out of luck. (or just make a "save" folder in ~/.config/Signal/) 6 | 7 | Runs using "--cap-add SYS_ADMIN" as I'm not JessFraz so couldn't get it working otherwise! 8 | 9 | ## MacOS: Using this image 10 | 11 | On MacOS, if you wish to run this image, you need to install `XQuartz` and 12 | `socat`. With `brew` installed, do this: 13 | 14 | ``` 15 | brew cask install xquartz 16 | brew install socat 17 | ``` 18 | 19 | Then you can place this bash snippet in your `~/.bash_profile`: 20 | 21 | ```sh 22 | signal() { 23 | 24 | local __default_int="$(netstat -rn -f inet | awk '/default/{print $6;exit}')" 25 | local __my_ip="$( ifconfig $__default_int inet | awk '/inet/ {print $2}' )" 26 | 27 | killall -0 quartz-wm > /dev/null 2>&1 28 | if [ $? -ne 0 ]; then 29 | echo "ERROR: Quartz is not running. Start Quartz and try again." 30 | exit 1 31 | fi 32 | 33 | # abuse of subshells to quietly background things is go go go 34 | 35 | ( socat TCP-LISTEN:6001,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" & SOCAT_PGM_PID=$! . ) >/dev/null 2>&1 36 | 37 | ( ( docker run --rm \ 38 | --net host \ 39 | --cap-add SYS_ADMIN \ 40 | -e XAUTHORITY=/tmp/xauth \ 41 | -e DISPLAY=$__my_ip:1 \ 42 | -v $HOME/.Xauthority:/tmp/xauth \ 43 | -v $HOME/.config/Signal:/home/signal/.config/Signal \ 44 | ${1+"$@"} barn/signal \ 45 | && pkill -f "socat TCP-LISTEN:6001,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"" ) & ) 46 | 47 | } 48 | ``` 49 | 50 | Now, `signal` should launch the application in the background. 51 | 52 | # Reference 53 | 54 | - https://signal.org/download/ 55 | --------------------------------------------------------------------------------