Skip to content

build(compose): make the devlake image registry configurable - #9090

Open
DoDiODev wants to merge 1 commit into
apache:mainfrom
DoDiODev:pr/compose-configurable-image-registry
Open

build(compose): make the devlake image registry configurable#9090
DoDiODev wants to merge 1 commit into
apache:mainfrom
DoDiODev:pr/compose-configurable-image-registry

Conversation

@DoDiODev

@DoDiODev DoDiODev commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

docker-compose-dev-mysql.yml and docker-compose-dev-postgresql.yml pull the pre-built devlake-dashboard and devlake-config-ui images through devlake.docker.scarf.sh. Scarf is a gateway that records download analytics for the project. Some environments (corporate registries, air-gapped mirrors, privacy policies) need to pull those images directly instead.

This PR introduces DEVLAKE_IMAGE_REGISTRY so the registry prefix can be overridden, while keeping the Scarf gateway as the default:

image: ${DEVLAKE_IMAGE_REGISTRY:-devlake.docker.scarf.sh}/apache/devlake-dashboard:latest
image: ${DEVLAKE_IMAGE_REGISTRY:-devlake.docker.scarf.sh}/apache/devlake-config-ui:latest
# opt out, pull straight from Docker Hub
DEVLAKE_IMAGE_REGISTRY=docker.io docker compose -f docker-compose-dev-mysql.yml up

3 files changed, +13/-4.

Why the env.example entry is commented out

The three services read ./.env via env_file. An active assignment there would not only drive the image substitution, it would also be injected as an environment variable into the running devlake, config-ui and grafana containers — a behaviour change unrelated to the goal. The default therefore lives inline in the compose files, and env.example only documents the knob.

Validation

Rendered with Docker Compose 5.5.0 / Docker 29.5.3, for both compose files:

Case Result
Variable unset, existing .env from main docker compose config byte-identical to main
.env copied from the new env.example byte-identical to main
DEVLAKE_IMAGE_REGISTRY=docker.io in .env docker.io/apache/devlake-{dashboard,config-ui}:latest
DEVLAKE_IMAGE_REGISTRY=ghcr.io/example in the shell ghcr.io/example/apache/devlake-…:latest
Empty value falls back to the Scarf default (:- semantics)

Both endpoints were confirmed to resolve: docker manifest inspect succeeds for devlake.docker.scarf.sh/apache/devlake-dashboard:latest, and the Docker Hub registry API returns 200 for apache/devlake-dashboard and apache/devlake-config-ui, so the opt-out target really exists.

env.example still parses cleanly as a dotenv file, both compose files parse as YAML, and the commit message matches the lint-commit-message pattern.

Deliberately out of scope

  • devops/releases/lake-v0.*/docker-compose.yml — released artifacts, pinned to historical versions.
  • .devcontainer/docker-compose.yml — Compose reads .env relative to that file, so a root-level .env would not apply; changing it would only look configurable.
  • Every other image (mysql, postgres, oauth2-proxy, mericodev/*) keeps its existing registry.

No functional change for anyone who does not set the variable.

The docker-compose-dev-*.yml files pull the pre-built devlake-dashboard and
devlake-config-ui images through devlake.docker.scarf.sh, the Scarf gateway
that provides download analytics for the project.

Introduce DEVLAKE_IMAGE_REGISTRY so the registry prefix can be overridden, for
example with docker.io to pull directly from Docker Hub. The Scarf gateway
stays the default and is written inline in the compose files, so a rendered
`docker compose config` is byte-identical when the variable is unset and
existing .env files keep working untouched.

env.example documents the variable but leaves it commented out on purpose: the
services read that file via `env_file`, so an active assignment would also be
injected as an environment variable into the running containers.

Signed-off-by: DoDiODev <DoDiDev@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant