Skip to content

Building Images

FluidRAG uses Docker Buildx Bake for building images, with a Makefile that provides convenient wrappers. The build system supports local development (native platform) and production (linux/amd64) targets.

FluidRAG consists of four Docker images:

ImageDockerfileBuild ContextBase
fluidrag./DockerfileProject rootPython 3.12-slim (multi-stage)
fluidrag-admin-apiservices/config-api/DockerfileProject rootNode.js
fluidrag-admin-uiservices/admin-ui/Dockerfileservices/admin-ui/Node.js + nginx
fluidrag-gatewayservices/gateway/Dockerfileservices/gateway/nginx

The main fluidrag image uses a multi-stage build — a builder stage installs dependencies with uv, and the runtime stage copies only the virtual environment and application code.

Terminal window
make build-all-local VERSION=0.4.1

This builds all four images for your native platform (ARM64 on Mac, AMD64 on Linux) and loads them into Docker.

Terminal window
make build-local VERSION=0.4.1

Use this when you’ve only changed backend Python code and don’t need to rebuild the admin UI or gateway.

If code changes aren’t reflected in the container (stale cache):

Terminal window
make build-all-local-no-cache VERSION=0.4.1

When you change dependencies in pyproject.toml, regenerate the lockfile before building:

Terminal window
make uv-lock

The build-all-local target runs uv-lock automatically.

Production builds target linux/amd64 and publish to GitHub Container Registry (GHCR).

Terminal window
make build-prod VERSION=0.4.1
Terminal window
make build-publish-prod VERSION=0.4.1

This pushes to ghcr.io/nodekat/fluidrag:0.4.1 and ghcr.io/nodekat/fluidrag:latest.

Terminal window
make build-publish-all-prod-no-cache VERSION=0.4.1

This builds and pushes all four images with no cache for maximum reproducibility:

  • ghcr.io/nodekat/fluidrag:0.4.1
  • ghcr.io/nodekat/fluidrag-admin-api:0.4.1
  • ghcr.io/nodekat/fluidrag-admin-ui:0.4.1
  • ghcr.io/nodekat/fluidrag-gateway:0.4.1

The build system is defined in docker-bake.hcl at the project root. Key targets:

Bake TargetPlatformCachePurpose
localNativeYesLocal development
productionlinux/amd64Yes (registry)Production builds
production-no-cachelinux/amd64NoCritical releases

You can invoke Bake directly:

Terminal window
VERSION=0.4.1 docker buildx bake local
VERSION=0.4.1 docker buildx bake production
TargetDescription
make upStart all services
make downStop all services
make logsFollow all logs
make logs-adminFollow admin service logs
TargetDescription
make build-localBuild API image (native, cached)
make build-all-localBuild all images (native, cached)
make build-all-local-no-cacheBuild all images (native, no cache)
make build-prodBuild API image (linux/amd64, cached)
make build-publish-prodBuild and push API image
make build-publish-all-prod-no-cacheBuild and push all images (no cache)

All build targets accept a VERSION variable:

Terminal window
make build-local VERSION=0.4.1
make build-prod VERSION=0.4.1

Default version is defined in the Makefile (VERSION ?= 0.4.1).