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)
bash
envsubst
via gettext (Fedora)desktop-file-install
via desktop-file-utils (Fedora)tar
via 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: mozilla-unified
mkdir -v dist mozilla-unified mozbuild; chmod -v 0777 dist mozilla-unified mozbuild
docker run -v $(pwd)/dist:/dist:z -v $(pwd)/mozbuild:/root/.mozbuild:z -v $(pwd)/mozilla-unified:/src/mozilla-unified:z -v $(pwd)/mozconfig:/src/mozconfig:z -v $(pwd)/patches:/src/patches:z -it --rm --name firefox-build --hostname firefox-build firefox-build:fedora
python3 bootstrap.py --no-interactive --application-choice browser
Update 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 .
docker run -v $(pwd)/dist:/dist:z -v $(pwd)/mozbuild:/root/.mozbuild:z -v $(pwd)/sccache:/root/.cache/sccache:z -v $(pwd)/mozilla-unified:/src/mozilla-unified:z -v $(pwd)/mozconfig:/src/mozconfig:z -v $(pwd)/patches:/src/patches:z -it --rm --name firefox-build --hostname firefox-build firefox-build:fedora
cd mozilla-unified
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/)
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.1
My workaround;
./mach clobber
# continue #Build section with `build-prepare.sh`