Skip to main content

Docker Development Setup

The easiest and most reliable way to build Cromite is using the pre-built Docker images. These images contain all dependencies, tools, and the complete Chromium source with Cromite patches already applied.

Why Use Docker?

Building Chromium from source requires:
  • Significant disk space (100GB+ for full build)
  • Complex dependencies (specific versions of build tools, libraries, SDKs)
  • Lengthy setup (downloading source, applying patches, configuring environment)
Docker images solve these problems by providing a ready-to-build environment that works consistently across different host systems.
All Docker images are available at uazo/cromite-build on Docker Hub

Docker Image Types

Cromite’s build process uses a layered Docker image approach:
1

uazo/build-deps

Base dependencies imageContains:
  • Build tools (GCC, Clang, LLVM)
  • depot_tools (Chromium build system)
  • Android SDK/NDK
  • Python, Go, Node.js
  • System libraries and headers
Format: uazo/build-deps:<VERSION>
2

uazo/chromium

Chromium source imageBuilt on top of build-deps, adds:
  • Complete Chromium source code
  • Chromium version from build/RELEASE
  • Synced to specific version tag
Format: uazo/chromium:<VERSION>
3

uazo/cromite

Cromite patches appliedBuilt on top of chromium, adds:
  • All 333 Cromite patches
  • Cromite-specific build files
  • Applied in order from cromite_patches_list.txt
Format: uazo/cromite:<VERSION>-<COMMIT>
4

uazo/cromite-build

Ready-to-build image (Recommended)Complete build environment:
  • All patches applied
  • Build arguments configured
  • Dependencies compiled
  • Ready to run build commands
Format: uazo/cromite-build:<VERSION>-<COMMIT>

Quick Start

1

Find Your Image Version

Each Cromite release description contains the corresponding Docker image name.For example, for Cromite version 145.0.7632.120 with commit fac696b3a422f196f698e6543913946ddaba1ef3:
VERSION=145.0.7632.120
SHA=fac696b3a422f196f698e6543913946ddaba1ef3
IMAGE=uazo/cromite-build:$VERSION-$SHA
Check the Docker Hub tags page to see all available images.
2

Set Environment Variables

# Image configuration
VERSION=145.0.7632.120
SHA=fac696b3a422f196f698e6543913946ddaba1ef3
CHVERSION=uazo/cromite-build:$VERSION-$SHA

# Container configuration
CONTAINER=cromite-dev
BDEBUG=false
3

Create Docker Container

docker create --name $CONTAINER \
    -e "WORKSPACE=/home/lg/working_dir" \
    -e "TARGET_ISDEBUG=$BDEBUG" \
    --entrypoint "tail" $CHVERSION "-f" "/dev/null"
This creates a container that stays running in the background.
4

Start Container

docker start $CONTAINER
5

Enter Container

docker exec -ti $CONTAINER bash
You’re now inside the container with a full build environment!

Container Workspace Setup

Once inside the container, set up your environment:
# Add build tools to PATH
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH

Workspace Directory Structure

The container workspace is organized as:
/home/lg/working_dir/
├── chromium/
│   └── src/                    # Chromium source with patches
│       ├── chrome/
│       ├── content/
│       ├── build/
│       └── out/                # Build output directory
├── depot_tools/                # Chromium build tools
├── cromite/                    # Cromite repository
│   ├── build/
│   │   ├── RELEASE            # Version: 145.0.7632.120
│   │   ├── cromite.gn_args    # Build arguments
│   │   └── patches/           # 332 patch files
│   └── tools/
└── mtool/                      # Additional build utilities

Building Inside Docker

Android Build

cd $HOME/chromium/src/
autoninja -C out/Default chrome_public_apk

Linux Build

cd $HOME/chromium/src/
autoninja -C out/Linux chrome

Windows Build (Cross-Compilation)

cd $HOME/chromium/src/
autoninja -C out/Windows chrome
Build times vary:
  • Full build: 2-4 hours (depending on CPU cores)
  • Incremental build: 5-30 minutes
  • Android APK: ~3 hours
  • Linux/Windows: ~2.5 hours

Docker Environment Variables

Key environment variables you can configure:
WORKSPACE
string
default:"/home/lg/working_dir"
Base workspace directory inside the container
TARGET_ISDEBUG
boolean
default:"false"
Build debug version instead of release
  • true: Debug build with symbols
  • false: Optimized release build
USE_KEYSTORE
string
Path to Android keystore for signing APKs
KEYSTORE_PASSWORD
string
Password for Android keystore
CROMITE_PREF_HASH_SEED_BIN
string
Preference hash seed for secure preferences

Docker Build Workflow

The complete Docker build process (as used in GitHub Actions):
1

Pull or Build build-deps

docker pull uazo/build-deps:$VERSION || \
DOCKER_BUILDKIT=1 docker build -t uazo/build-deps:$VERSION \
  --build-arg VERSION=$VERSION \
  cromite/tools/images/build-deps/.
2

Pull or Build chromium

docker pull uazo/chromium:$VERSION || \
DOCKER_BUILDKIT=1 docker build -t uazo/chromium:$VERSION \
  --build-arg VERSION=$VERSION \
  cromite/tools/images/chr-source/.
3

Pull or Build cromite

docker pull uazo/cromite:$VERSION-$SHA || \
DOCKER_BUILDKIT=1 docker build -t uazo/cromite:$VERSION-$SHA \
  --build-arg CROMITE_SHA=$SHA \
  --build-arg VERSION=$VERSION \
  cromite/tools/images/cromite-source/.
4

Pull or Build cromite-build

docker pull uazo/cromite-build:$VERSION-$SHA || \
DOCKER_BUILDKIT=1 docker build -t uazo/cromite-build:$VERSION-$SHA \
  --build-arg CROMITE_SHA=$SHA \
  --build-arg VERSION=$VERSION \
  cromite/tools/images/cromite-build/.
This workflow pulls pre-built images if available, otherwise builds them locally. The GitHub Actions workflow at .github/workflows/build_cromite.yaml shows the complete process.

Docker Image Maintenance

Cleaning Up Old Images

# Remove old containers
docker rm cromite-dev

# Remove old images
docker rmi uazo/cromite-build:old-version-hash

# Clean up dangling images
docker image prune -f

# Full cleanup (careful!)
docker system prune -a

Inspecting Images

docker images | grep cromite

Platform Support

The Docker images support building for:

Android

  • arm64-v8a
  • armeabi-v7a
  • x86_64
  • SystemWebView

Linux

  • x86_64
  • Desktop browser

Windows

  • x86_64
  • Cross-compiled from Linux

Building macOS

Not supported(Requires macOS host)

Troubleshooting

Check if the image exists:
docker images | grep cromite-build
If not found, pull from Docker Hub:
docker pull uazo/cromite-build:$VERSION-$SHA
Docker images are large (20-40GB). Free up space:
# Check Docker disk usage
docker system df

# Clean up unused images
docker image prune -a
Ensure you’re running as the correct user inside the container:
whoami  # Should be 'lg'
cd $HOME  # Should work without errors
Re-run the PATH setup:
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
export HOME=/home/lg/working_dir
Make sure the VERSION matches the RELEASE file:
cat $HOME/cromite/build/RELEASE
# Should output: 145.0.7632.120

Advanced Usage

Mounting Local Directories

To persist build outputs or work with local patches:
docker create --name $CONTAINER \
    -e "WORKSPACE=/home/lg/working_dir" \
    -e "TARGET_ISDEBUG=$BDEBUG" \
    -v "$(pwd)/out:/home/lg/working_dir/chromium/src/out" \
    -v "$(pwd)/patches:/home/lg/patches" \
    --entrypoint "tail" $CHVERSION "-f" "/dev/null"

Using Proxy

If you need to use a proxy:
docker create --name $CONTAINER \
    -e "WORKSPACE=/home/lg/working_dir" \
    -e "HTTP_PROXY=http://proxy.example.com:8080" \
    -e "HTTPS_PROXY=http://proxy.example.com:8080" \
    --entrypoint "tail" $CHVERSION "-f" "/dev/null"

Running Specific Build Targets

autoninja -C out/Default content_shell_apk

Next Steps

Building Guide

Complete guide to building Cromite from source

Patch System

Understanding Cromite’s 333 patches

Docker Hub

Browse all available Docker images

GitHub Workflow

See the complete build automation

Build docs developers (and LLMs) love