Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Last active August 28, 2017 22:21
Show Gist options
  • Save Lewiscowles1986/8c5557cc22a8f986edeae39c92b8344b to your computer and use it in GitHub Desktop.
Save Lewiscowles1986/8c5557cc22a8f986edeae39c92b8344b to your computer and use it in GitHub Desktop.
Firefox Nightly
#!/bin/bash
mkdir -p ~/projects/personal/firefox-docker
cd ~/projects/personal/firefox-docker
if [ -!e "./Dockerfile" ]; then
wget --quiet https://gist.github.com/Lewiscowles1986/8c5557cc22a8f986edeae39c92b8344b/raw/12767573edb0b5553a76ec663ed6b621acbcbe64/Dockerfile
fi
docker build . --tag firefox-nightly --rm
xhost +local:root
docker run --rm -d --shm-size 2g -e DISPLAY=$DISPLAY -e USER_ID=$UID -e GROUP_ID=$UID -v $HOME/Downloads:/data/Downloads -v $HOME/.config/mozilla/firefox-nightly:/data/.firefox -v /dev/snd:/dev/snd --privileged -v /tmp/.X11-unix:/tmp/.X11-unix --memory 1024mb --name firefox-nightly --net host firefox-nightly
#
# Firefox Dev Channel
#
# Inspired / assisted by:
#
# * https://hub.docker.com/r/minty/firefox/
# * https://github.com/mozilla/geckodriver/issues/285#issuecomment-325336816
#
FROM ubuntu:16.04
MAINTAINER CD2Team <codesign2@icloud.com>
RUN apt-get update -yqq && apt-get install -yqq \
libfontconfig \
libfreetype6 \
libxrender1 \
libasound2 \
libdbus-glib-1-2 \
libgtk-3-0 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxt6 \
tar \
bzip2 \
wget \
pulseaudio \
libasound2 \
libgl1-mesa-dri \
libgl1-mesa-glx \
libcanberra-gtk3-0 \
libcanberra-gtk3-module
RUN wget --quiet "https://download.mozilla.org/?product=firefox-nightly-latest-l10n-ssl&os=linux64&lang=en-GB" -O /tmp/firefox.tar.bz2
RUN mkdir -p /opt/firefox
RUN mkdir -p /data
RUN tar -xjf /tmp/firefox.tar.bz2 -C /opt
RUN wget --quiet "https://raw.githubusercontent.com/TheBiggerGuy/docker-pulseaudio-example/master/pulse-client.conf" -O /etc/pulse/client.conf
ENTRYPOINT ["/opt/firefox/firefox"]
CMD ["-profile", "/data"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment