To build the docker image you need at least 2 GB disk space.
To run the container and building firefox you need at least additional 20 GB disk space.
- Open Container Runtime (i.e. containerd, mobby-engine)
bashenvsubstvia gettext (Fedora)desktop-file-installvia desktop-file-utils (Fedora)tarvia tar (Fedora)
Clone and build docker image:
git clone https://git.compilenix.org/CompileNix/firefox-build.git
cd firefox-build
docker build -t firefox-build:fedora .Now you can prepare the build environment, by installing GIT cinnabar and downloading Firefox source using bootstrap.py.
When asked for Destination directory for clone, enter: firefox
sudo mkdir -v dist firefox mozbuild; sudo chmod -v 0777 dist firefox mozbuild
./run-container.sh --interactive
python3 bootstrap.py --no-interactive --application-choice browserUpdate your mozconfig, if you want. Then execute the snippet below.
When asked for Destination directory for Git clone, enter nothing (hit enter).
docker build -t firefox-build:fedora .
./run-container.sh --interactive
cd firefox
build-prepare.sh
apply-patches.py
build.sh
exit
./install.sh # you may run this with sudo if your current user is not permitted to write into the installation directory (default is ~/bin/)run-container.sh starts the container with --oom-score-adj 1000, so when the host runs out of memory the build is killed first instead of other processes. If the build gets OOM-killed (exit code 137), lower JOBS in mozconfig.
This "issue" came up with the release of Rust 1.45.
My workaround; downgrade Rust to 1.44.1:
# run this after "bootstrap" and before "./mach build"
source ~/.cargo/env
rustup default 1.44.1My workaround;
./mach clobber
# continue #Build section with `build-prepare.sh`