aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile38
-rwxr-xr-xrun.sh25
2 files changed, 63 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..321797f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,38 @@
+FROM ubuntu:18.04
+
+
+RUN apt-get update && apt-get install -y \
+ dirmngr \
+ gnupg \
+ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0AB215679C571D1C8325275B9BDB3D89CE49EC21 \
+ && 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 \
+ ffmpeg \
+ pulseaudio \
+ libgl1-mesa-glx \
+ dbus-x11 \
+ sudo
+
+RUN /bin/bash
+
+# ENV UNAME thorny
+
+
+# # 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 && \
+# 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
diff --git a/run.sh b/run.sh
new file mode 100755
index 0000000..823d002
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,25 @@
+
+# docker run --rm \
+# --user $(id -u):$(id -g) \
+
+
+# Error with container opening socket
+# https://github.com/jessfraz/dockerfiles/issues/4
+
+
+docker build -t firefox .
+
+xhost local:root
+
+docker run -it \
+ --rm \
+ -v /tmp/.X11-unix:/tmp/.X11-unix \
+ -e DISPLAY=unix"$DISPLAY" \
+ --env PULSE_SERVER=unix:/tmp/pulseaudio.socket \
+ --env PULSE_COOKIE=/tmp/pulseaudio.cookie \
+ --volume /tmp/pulseaudio.socket:/tmp/pulseaudio.socket \
+ --volume /tmp/pulseaudio.client.conf:/etc/pulse/client.conf \
+ --volume /etc/timezone:/etc/timezone:ro \
+ --volume /etc/localtime:/etc/localtime:ro \
+ --name firefox \
+ firefox