This repository provides automated CI/CD pipelines to build and publish Docker images for Overleaf Community Edition.
Note: This repository does not contain any upstream Overleaf source code. All builds dynamically checkout the upstream overleaf/overleaf repository at build time.
Images are published to GitHub Container Registry (GHCR):
ghcr.io/btreemap/overleaf-base- Base image with dependencies and TeX Liveghcr.io/btreemap/overleaf- Full Overleaf runtime with TeX Live scheme-full
We mirror pre-built images from various upstream sources with multiple tags for version pinning:
| Tag | Description |
|---|---|
:official |
Latest official release |
:official-latest |
Same as :official |
:official-X.Y.Z |
Specific version (e.g., :official-5.1.2) |
:official-X.Y |
Minor version (e.g., :official-5.1) |
:official-X |
Major version (e.g., :official-5) |
Pre-built images with full TeX Live installation:
| Tag | Description |
|---|---|
:full |
Latest full release |
:full-latest |
Same as :full |
:full-X.Y.Z |
Specific version (e.g., :full-5.1.2) |
:full-X.Y |
Minor version (e.g., :full-5.1) |
:full-X |
Major version (e.g., :full-5) |
Community Extended Pack with additional features:
| Tag | Description |
|---|---|
:cep |
Latest CEP release |
:cep-latest |
Same as :cep |
:cep-X.Y.Z |
Specific version (e.g., :cep-5.1.2) |
:cep-X.Y |
Minor version (e.g., :cep-5.1) |
:cep-X |
Major version (e.g., :cep-5) |
CEP tags from Docker Hub may include extension suffixes such as
5.5.4-ext-v3.2. The mirror workflow preserves the full tag while still generating major/minor tags from the baseX.Y.Zportion.
The edge images are built from the upstream main branch with full TeX Live:
| Tag | Description |
|---|---|
:edge |
Latest edge build from main |
:edge-sha-<SHA> |
Immutable tag by upstream commit SHA |
:edge-YYYY-MM-DD |
Date of edge build |
:edge-YYYY-MM-DD.HH-MM-SS |
Datetime of edge build |
| Tag | Description |
|---|---|
:edge |
Latest base image |
:edge-sha-<SHA> |
Immutable tag by upstream commit SHA |
:edge-YYYY-MM-DD |
Date of base build |
Images are built for:
linux/amd64linux/arm64(when upstream images provide arm64; workflows skip unsupported platforms to keep builds green)
The ghcr.io/btreemap/overleaf edge images include TeX Live scheme-full pre-installed. This means:
- Complete LaTeX package availability - No need to install packages at runtime
- Air-gapped operation - Works fully offline without network access to CTAN mirrors
- Production ready - All common LaTeX packages are included out of the box
The base image (overleaf-base) includes TeX Live scheme-basic. The full TeX Live installation is added in the runtime image build.
| Image | Schedule | Description |
|---|---|---|
overleaf-base |
Weekly (Sunday) | Refreshes base dependencies and TeX Live |
overleaf (edge) |
Daily | Builds from upstream main branch |
overleaf (mirrored) |
Daily | Mirrors from Docker Hub sources |
Builds are skipped if the image for that upstream SHA already exists (to avoid redundant work).
Mirror sync uses a binary search algorithm to efficiently detect which versions need to be mirrored, minimizing API calls.
# Pull the latest official image (mirrored from sharelatex/sharelatex)
docker pull ghcr.io/btreemap/overleaf:official
# Or use the full variant with complete TeX Live
docker pull ghcr.io/btreemap/overleaf:full
# Or use a specific version
docker pull ghcr.io/btreemap/overleaf:official-5.1.2
# Run Overleaf
docker run -d \
-p 80:80 \
-v overleaf-data:/var/lib/overleaf \
ghcr.io/btreemap/overleaf:official# Pull the latest edge image (from main branch)
docker pull ghcr.io/btreemap/overleaf:edgeversion: '3'
services:
overleaf:
image: ghcr.io/btreemap/overleaf:official
ports:
- "80:80"
volumes:
- overleaf-data:/var/lib/overleaf
environment:
OVERLEAF_APP_NAME: "My Overleaf"
volumes:
overleaf-data:- Detect Upstream State: Workflows query upstream for the latest
mainSHA - Check GHCR: Skip builds if images for those SHAs already exist
- Checkout Upstream: Dynamically checkout
overleaf/overleafat the target ref - Build Images: Multi-arch builds using Docker Buildx with GHA cache
- Publish: Push to GHCR with appropriate tags
- Discover Versions: Fetch all semantic version tags from Docker Hub sources
- Binary Search Optimization: Use binary search to find which versions need mirroring
- Mirror: Use
docker buildx imagetools createto copy images without rebuilding - Multi-Tag: Apply multiple tags (X.Y.Z, X.Y, X) for version pinning flexibility
- Detect Upstream: Read the latest upstream
mainSHA and generate timestamps - Weekly Refresh: Scheduled builds always rebuild to refresh dependencies
- GHCR Check: Push is skipped if the SHA-tagged image already exists
- Multi-Arch Build: Build
linux/amd64andlinux/arm64variants in parallel - Manifest Publish: Merge digests into a multi-arch
edgemanifest
- Select Version: Use the mirror script to find the latest upstream release
- Guard Daily Tag: Skip if today's date tag already exists (unless forced)
- Optimized Dockerfile: Generate a single-layer image with scheme-full TeX Live
- Multi-Arch Build: Build both architectures and publish a manifest list
- Tag Output: Publish
latest, date, and<version>-fulltags
The mirror_images.py CLI powers the mirroring workflow:
discover: Lists versions to mirror, using binary search to limit GHCR checksmirror: Copies a specific version and tags it as full, minor, and majorupdate-latest: Updates floatinglatesttags for each variantlatest: Returns the newest upstream version tag from Docker Hub
The check_platform_support.py helper validates whether an upstream image
supports a requested platform based on the JSON emitted by
docker buildx imagetools inspect --format '{{json .}}'. Workflows use its
true/false output to decide whether optional architectures should build.
Each workflow job that invokes helper scripts must include an
actions/checkout step so the .github/scripts directory is present on the
runner workspace. Omitting checkout results in missing-script failures.
- Dependabot is configured to monitor GitHub Actions updates weekly so workflows stay current with security fixes.
- Dependency Review runs on pull requests to surface vulnerable dependency introductions before merges.
This project builds images from the official Overleaf Community Edition repository.
For information about Overleaf itself:
The CI/CD configuration in this repository is provided under the MIT License.
The Docker images built by this repository contain software from overleaf/overleaf which is licensed under the GNU Affero General Public License v3.0.
When using the built images, you must comply with the AGPL-3.0 license terms of the upstream Overleaf project.