Building in Docker
Camoufox only
To build Camoufox on a non-Linux system you can use Docker.
Camouwolf
Camouwolf has no Docker build. It builds on a Linux host only; see Building in CLI.
- From the
browserfolder of the repository, create the Docker image containing Firefox's source code:
cd browser
docker build -t camoufox-builder .- Build Camoufox patches to a target platform and architecture:
docker run -v "$(pwd)/dist:/app/dist" camoufox-builder --target <os> --arch <arch>How can I use my local ~/.mozbuild directory?
If you want to use the host's .mozbuild directory, you can use the following command instead to run the docker:
docker run \
-v "$HOME/.mozbuild":/root/.mozbuild:rw,z \
-v "$(pwd)/dist:/app/dist" \
camoufox-builder \
--target <os> \
--arch <arch>Docker CLI Parameters
The container takes the multibuild.py flags:
| Flag | Values |
|---|---|
--target |
linux, windows, macos (one or more, required) |
--arch |
x86_64, arm64, i686 (one or more, required; i686 builds Windows only) |
--bootstrap |
Bootstrap the build system first |
--clean |
Clean the build directory first |
--preflight |
Check that each target builds without building it |
docker run -v "$(pwd)/dist:/app/dist" camoufox-builder --target windows linux --arch x86_64 arm64Build artifacts will now appear written under the browser/dist/ folder.