From 973cb45a62be8f8a1da41cc20a0ab61c3ae6321d Mon Sep 17 00:00:00 2001 From: Michael Anghelone Date: Fri, 29 Dec 2017 15:35:07 -0500 Subject: [PATCH] Discord version 0.0.4 Updated readme a bit Dependencies have been updated accordingly Update script modifies all instances of the version to be built --- Dockerfile | 22 +++++++++++++--------- README.md | 38 ++++++++++++++++++++++++-------------- update.sh | 4 +++- 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index d59c13b..c9de392 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,31 +2,35 @@ FROM debian:jessie LABEL maintainer "Christophe Boucharlat " -# Discord Version 0.0.2 +# Discord Version 0.0.4 RUN apt-get update && apt-get install -y \ apt-utils \ dbus-x11 \ dunst \ hunspell-en-us \ - python3-dbus \ - software-properties-common \ libx11-xcb1 \ - gconf2 \ - libgtk2.0-0 \ - libxtst6 \ - libnss3 \ libasound2 \ + libatomic1 \ + libgconf-2-4 \ + libnotify4 \ + libnspr4 \ + libnss3 \ + libxss1 \ + libxtst6 \ + libappindicator1 \ + libc++1 \ wget \ --no-install-recommends && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN wget https://dl.discordapp.net/apps/linux/0.0.1/discord-0.0.1.tar.gz -O /tmp/discord.tar.gz && \ +RUN wget http://dl.discordapp.net/apps/linux/0.0.4/discord-0.0.4.tar.gz -O /tmp/discord.tar.gz && \ cd /tmp/ && \ tar xvzf /tmp/discord.tar.gz && \ rm /etc/fonts/conf.d/10-scale-bitmap-fonts.conf && \ - fc-cache -fv + fc-cache -fv && \ + rm /tmp/discord.tar.gz ENV QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb diff --git a/README.md b/README.md index 8628104..0568e2e 100644 --- a/README.md +++ b/README.md @@ -5,33 +5,43 @@ A Docker image that start a fresh discord client. [![Image Layers](https://images.microbadger.com/badges/image/xorilog/discord.svg)](https://microbadger.com/images/xorilog/discord) -## Usage +## Usage To spawn a new instance of Discord: ```shell -docker run --rm -it --name discord \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e DISPLAY=unix$DISPLAY \ - --device /dev/snd \ - -v /etc/localtime:/etc/localtime:ro \ - -v /.config/discord/:/root/.config/discord/ \ - xorilog/discord +USER=$(whoami); +xhost + local:discord; #allow discord to connect to X +docker run --rm -it \ + --name discord \ + --hostname discord \ + -v /home/$USER:/home/$USER \ + -e DISPLAY=$DISPLAY \ + -v /etc/group:/etc/group:ro \ + -v /etc/passwd:/etc/passwd:ro \ + -v /etc/shadow:/etc/shadow:ro \ + -v /tmp/.X11-unix:/tmp/.X11-unix:rw \ + -v /etc/localtime:/etc/localtime:ro \ + --user $(id -u) \ + --device /dev/snd \ + discord; +xhost - local:discord; #remove discord from being allowed to connect to X ``` -## Issues -* You have to log out Discord to close the docker container. +The previous commands is to be run on a linux machine. But Mac users, I have a special surprise for you. You can also do fun hacks with X11. Details are described [here](https://github.com/docker/docker/issues/8710). + +## Issues +* You have to log out Discord or be sure 'minimize to try' is turned off in user settings under linux settings to be able to close discord fully. ## FAQ ### Docker <1.8 Before Docker 1.8 you need to replace `--device /dev/snd` by `-v /dev/snd:/dev/snd --privileged`. - -### QXcbConnection: Could not connect to display unix:0 +### 'QXcbConnection: Could not connect to display unix:0' or 'No protocol specified' +Some form of ```shell xhost + ``` -do not forget to remove it after start or usage (`xhost -`) -The previous command is to be run on a linux machine. But Mac users, I have a special surprise for you. You can also do fun hacks with X11. Details are described [here](https://github.com/docker/docker/issues/8710). +Before running is required to get this working and remember to remove after finished usage (`xhost -`) Thanks to [Discord](https://discordapp.com/) for their great app ! diff --git a/update.sh b/update.sh index ff1a0bb..405bc48 100755 --- a/update.sh +++ b/update.sh @@ -1,9 +1,11 @@ #!/bin/bash # Gather latest version of discord -version=$(curl --head "https://discordapp.com/api/download?platform=linux&format=tar.gz" |grep Location |cut -d '/' -f 6) +version=$(curl --head "https://discordapp.com/api/download?platform=linux&format=tar.gz" |grep -i location |cut -d '/' -f 6) sed -i 's/Discord\ Version\ [0-9]*\.[0-9]*\.[0-9]*$/\Discord\ Version\ '$version'/' Dockerfile +sed -i 's/linux\/[0-9]*\.[0-9]*\.[0-9]*\/discord-[0-9]*\.[0-9]*\.[0-9]*/linux\/'$version'\/discord-'$version'/' Dockerfile + git commit -am "Discord version $version" -S git tag -am "Discord version $version" $version git push --follow-tags