aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2019-02-18 18:06:16 -0700
committerCody Hiar <codyfh@gmail.com>2019-02-18 18:06:16 -0700
commit0685bd8dbb6f06a4581de7cd3345571004b001c3 (patch)
tree3f56086fcfcdb547a553fdc7821d5ac6f75dddf6 /Dockerfile
parent00e4cdfee76dbe55c391ae3d0fba5e994954f57e (diff)
Basic running under non root user
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile30
1 files changed, 17 insertions, 13 deletions
diff --git a/Dockerfile b/Dockerfile
index 321797f..c8057d6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,4 @@
-FROM ubuntu:18.04
-
+FROM debian:sid-slim
RUN apt-get update && apt-get install -y \
dirmngr \
@@ -8,31 +7,36 @@ RUN apt-get update && apt-get install -y \
&& echo "deb http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial main" >> /etc/apt/sources.list.d/firefox.list \
&& apt-get update && apt-get install -y \
firefox \
+ apulse \
ffmpeg \
pulseaudio \
+ libasound2 \
libgl1-mesa-glx \
+ libpulse0 \
dbus-x11 \
sudo
RUN /bin/bash
-# ENV UNAME thorny
+ENV UNAME thorny
+ENV UID 1000
+ENV GID 985
# # Set up the user
-# RUN export UNAME=$UNAME UID=1000 GID=1000 && \
-# mkdir -p "/home/${UNAME}" && \
-# echo "${UNAME}:x:${UID}:${GID}:${UNAME} User,,,:/home/${UNAME}:/bin/bash" >> /etc/passwd && \
-# echo "${UNAME}:x:${UID}:" >> /etc/group && \
-# mkdir -p /etc/sudoers.d && \
+RUN export UNAME=$UNAME UID=$UID GID=1000 && \
+ mkdir -p "/home/${UNAME}" && \
+ echo "${UNAME}:x:${UID}:${GID}:${UNAME} User,,,:/home/${UNAME}:/bin/bash" >> /etc/passwd && \
+ echo "${UNAME}:x:${UID}:" >> /etc/group
+
+RUN chown thorny:thorny /home/thorny
# echo "${UNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${UNAME} && \
# chmod 0440 /etc/sudoers.d/${UNAME} && \
# chown ${UID}:${GID} -R /home/${UNAME} && \
# gpasswd -a ${UNAME} audio
-# USER $UNAME
-# ENV HOME /home/thorny
-# WORKDIR /home/thorny
-# # I don't know why the chown doesn't persist when added above
-# CMD sudo chown thorny:thorny -R /home/thorny && /bin/bash
+USER $UNAME
+ENV HOME /home/thorny
+WORKDIR /home/thorny
+CMD /bin/bash