Skip to content

Instantly share code, notes, and snippets.

@linktohack
Created January 23, 2017 00:30
Show Gist options
  • Save linktohack/a1f1ab63d15bf4b24a4cc7af7439d56f to your computer and use it in GitHub Desktop.
Save linktohack/a1f1ab63d15bf4b24a4cc7af7439d56f to your computer and use it in GitHub Desktop.
Firefox in Docker
FROM ubuntu:16.04
MAINTAINER linktohack@gmail.com
RUN apt-get update && \
apt-get install -y x11vnc xvfb dwm firefox && \
rm -rf /var/lib/apt/lists/*
RUN mkdir ~/.vnc && \
x11vnc -storepasswd 1234 ~/.vnc/passwd && \
bash -c 'echo "#!/bin/bash" > /entrypoint.sh' && \
bash -c 'echo "Xvfb :0 -screen 0 1024x768x16 &" >> /entrypoint.sh' && \
bash -c 'echo "sleep 1" >> /entrypoint.sh' && \
bash -c 'echo "export DISPLAY=:0" >> /entrypoint.sh' && \
bash -c 'echo "x11vnc -forever -usepw &" >> /entrypoint.sh' && \
bash -c 'echo "dwm &" >> /entrypoint.sh' && \
bash -c 'echo "firefox" >> /entrypoint.sh' && \
chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment