Public Repository

Last pushed: 2 years ago
Short Description
Dockerized Firefox (Firefox developer, nightly, stable)
Full Description

@frazelledazzell inspired Firefox Developer Edition container.

Download one of the Docker files

Build

Firefox Release (38.0)
% docker build -t minty/firefox .
Firefox Developer (latest)
% docker build -f Dockerfile-dev -t minty/firefox:dev .
Firefox Nightly (41.0a1)
% docker build -f Dockerfile-nightly -t minty/firefox:nightly .

Run

Permissions

If you want to use your local user for downoad/profile permissions you'll need to create ~/.config/mozilla/firefox-{VERSION} and ~/Downloads ahead of time.
If you leave the USER_ID and GROUP_ID environment variables out of the below script the root user will be used to start Firefox.

Place something like the below into a script somewhere, ~/bin/firefox:

#/bin/bash

version=$1
name="firefox-$version"
image="minty/firefox:$version"
if [ -z "$version" ]; then
    version="release"
    name="firefox"
    image="minty/firefox"
fi

xhost local:root
exists=$(docker ps -a --filter name=$name | grep $name)
if [ -z "$exists" ]; then
    docker run -d \
        -e DISPLAY=unix$DISPLAY \
        -e USER_ID=$UID \
        -e GROUP_ID=$UID \
        -v $HOME/Downloads:/data/Downloads \
        -v $HOME/.config/mozilla/firefox-$version:/data/.firefox \
        -v /dev/snd:/dev/snd --privileged \
        -v /tmp/.X11-unix:/tmp/.X11-unix \
        --cpuset-cpus 0 \
        --memory 1024mb \
        --name $name \
        --net host \
        $image
else
    docker start -a $name
fi

Then execute it with the environment you'd like:

% firefox
% firefox dev
% firefox nightly
Docker Pull Command
Owner
minty

Comments (0)