Skip to content

Instantly share code, notes, and snippets.

@outloudvi
Created April 28, 2019 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save outloudvi/e6f82f588cef8149bf22118ba234fe08 to your computer and use it in GitHub Desktop.
Save outloudvi/e6f82f588cef8149bf22118ba234fe08 to your computer and use it in GitHub Desktop.
A simple Firefox sandbox with Docker.
FROM ubuntu:19.04
RUN sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \ # Optional
sed -i 's/security.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \ # Optional
apt-get update && apt-get install -y firefox fonts-noto-cjk && \
useradd -m developer
USER developer
ENV HOME /home/developer
CMD /usr/bin/firefox -ProfileManager
# docker build . -t firefox:disco
# docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox:disco
# Adapted from http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment