Multi-Architecture Docker Support#
RAGFlow publishes Docker images as manifest lists covering linux/amd64 and linux/arm64, so docker pull on any supported architecture transparently selects the correct layer. Support spans three distinct layers: the release CI workflow (how images are built and pushed), the ragflow_deps base image (arch-aware binary artifacts), and the sandbox executor (runtime Docker CLI installation).
Release CI: Docker Buildx multi-arch publish#
The release workflow originally built a single-arch image with docker build and pushed only the runner's native amd64 layer. PR #15848 replaced that step with a Docker Buildx flow:
- Register QEMU binfmt emulators via
tonistiigi/binfmt:qemu-v8.1.5 --install arm64,amd64. - Create (or reuse) a
docker-container-driver buildx builder namedragflow-multiarch. - Run
docker buildx build --platform linux/amd64,linux/arm64 --tag infiniflow/ragflow:${RELEASE_TAG} --tag infiniflow/ragflow:latest --pushso both arches land in a single manifest list. - A post-build validation step calls
docker buildx imagetools inspecton both tags and fails the workflow if eitherlinux/amd64orlinux/arm64is absent .
The workflow triggers on version tags (v*.*.*) and the mutable nightly tag (via schedule), so both stable releases and nightly builds are multi-arch .
Note:
infiniflow/ragflow_deps:latestmust itself be a multi-arch manifest for the arm64 layer to build. Rebuilding and re-pushing the deps image multi-arch is a prerequisite before the arm64 image layer can succeed .
ragflow_deps image: arch-aware artifacts#
The ragflow_deps image is built from a FROM scratch base that bundles both amd64 and arm64 artifacts side by side. download_deps.py downloads both variants ahead of build time:
| Artifact | amd64 | arm64 |
|---|---|---|
uv package manager | uv-x86_64-unknown-linux-gnu.tar.gz | uv-aarch64-unknown-linux-gnu.tar.gz |
libssl1.1 (legacy OpenSSL) | libssl1.1_1.1.1f-1ubuntu2_amd64.deb | libssl1.1_1.1.1f-1ubuntu2_arm64.deb |
| Stagehand server binary | stagehand-server-v3-linux-x64 | stagehand-server-v3-linux-arm64 |
Both variants are copied into the image root (ragflow_deps/Dockerfile), and the main Dockerfile selects the right one at build time using uname -m checks.
Main Dockerfile: architecture-conditional installation#
The main Dockerfile uses uname -m guards in multiple places to select arch-correct binaries at build time:
uvinstaller — checksx86_64vsaarch64and extracts the matching tarball from the deps image .- Stagehand server binary — maps
x86_64 → x64andaarch64|arm64 → arm64, copies the matching binary into the stagehand Go cache path . - MS SQL ODBC driver — installs
msodbcsql18onarm64/aarch64andmsodbcsql17onx86_64. libssl1.1legacy DEB — installs theamd64.deborarm64.debvariant as appropriate .
Sandbox executor: arch-aware Docker CLI install#
The agent/sandbox/executor_manager/Dockerfile runs a Python FastAPI service that invokes Docker CLI. PR #12434 fixed failures on ARM CPUs by replacing a hardcoded x86_64 static binary URL with an architecture-aware download:
- Declares
ARG TARGETARCHandARG TARGETVARIANT(BuildKit injected) . - Uses a
casestatement mappingamd64 → x86_64,arm64 → aarch64,armv7/arm* → armhf,armv6 → armel,ppc64le,s390x. - Downloads
docker-29.1.0.tgzfromdownload.docker.com/linux/static/stable/${DOCKER_ARCH}/and symlinks/usr/bin/docker → /usr/local/bin/docker.
Key files#
| File | Purpose |
|---|---|
Dockerfile | Main RAGFlow image; arch-conditional binary selection |
ragflow_deps/Dockerfile | Deps base image; ships both amd64 and arm64 artifacts |
ragflow_deps/download_deps.py | Downloads all deps including both-arch binaries before image build |
.github/workflows/release.yml | CI: Buildx multi-arch publish on tag/nightly |
agent/sandbox/executor_manager/Dockerfile | Sandbox executor; TARGETARCH-aware Docker CLI install |