build(compose): make the devlake image registry configurable - #9090
Open
DoDiODev wants to merge 1 commit into
Open
build(compose): make the devlake image registry configurable#9090DoDiODev wants to merge 1 commit into
DoDiODev wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker-compose-dev-mysql.ymlanddocker-compose-dev-postgresql.ymlpull the pre-builtdevlake-dashboardanddevlake-config-uiimages throughdevlake.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_REGISTRYso the registry prefix can be overridden, while keeping the Scarf gateway as the default:# opt out, pull straight from Docker Hub DEVLAKE_IMAGE_REGISTRY=docker.io docker compose -f docker-compose-dev-mysql.yml up3 files changed, +13/-4.
Why the
env.exampleentry is commented outThe three services read
./.envviaenv_file. An active assignment there would not only drive the image substitution, it would also be injected as an environment variable into the runningdevlake,config-uiandgrafanacontainers — a behaviour change unrelated to the goal. The default therefore lives inline in the compose files, andenv.exampleonly documents the knob.Validation
Rendered with Docker Compose 5.5.0 / Docker 29.5.3, for both compose files:
.envfrommaindocker compose configbyte-identical tomain.envcopied from the newenv.examplemainDEVLAKE_IMAGE_REGISTRY=docker.ioin.envdocker.io/apache/devlake-{dashboard,config-ui}:latestDEVLAKE_IMAGE_REGISTRY=ghcr.io/examplein the shellghcr.io/example/apache/devlake-…:latest:-semantics)Both endpoints were confirmed to resolve:
docker manifest inspectsucceeds fordevlake.docker.scarf.sh/apache/devlake-dashboard:latest, and the Docker Hub registry API returns200forapache/devlake-dashboardandapache/devlake-config-ui, so the opt-out target really exists.env.examplestill parses cleanly as a dotenv file, both compose files parse as YAML, and the commit message matches thelint-commit-messagepattern.Deliberately out of scope
devops/releases/lake-v0.*/docker-compose.yml— released artifacts, pinned to historical versions..devcontainer/docker-compose.yml— Compose reads.envrelative to that file, so a root-level.envwould not apply; changing it would only look configurable.mysql,postgres,oauth2-proxy,mericodev/*) keeps its existing registry.No functional change for anyone who does not set the variable.