From cd549c78e5736caa266e1cd3fbc98349acf11a14 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Mon, 14 Dec 2015 00:20:09 -0800 Subject: [PATCH] Run skype as a non-root user. --- skype/Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/skype/Dockerfile b/skype/Dockerfile index 85d5eb8..9bc208b 100644 --- a/skype/Dockerfile +++ b/skype/Dockerfile @@ -2,6 +2,7 @@ # (but I have a container for that) # # docker run -v /tmp/.X11-unix:/tmp/.X11-unix \ +# -v $HOME/.Skype:/home/skype/.Skype \ # -e DISPLAY=unix$DISPLAY \ # --link pulseaudio:pulseaudio \ # -e PULSE_SERVER=pulseaudio \ @@ -27,5 +28,14 @@ RUN curl http://download.skype.com/linux/skype-debian_4.3.0.37-1_i386.deb > /usr apt-get install -fy \ && rm -rf /var/lib/apt/lists/* +# Make a user +ENV HOME /home/skype +RUN useradd --create-home --home-dir $HOME skype \ + && chown -R skype:skype $HOME \ + && usermod -a -G audio,video skype + +WORKDIR $HOME +USER skype + # Start Skype ENTRYPOINT ["skype"]