Docker Compose Local and CI Usage¶
Deployment-agnostic interpretation¶
Compose usage pattern is for running a prebuilt image ${REGISTRY_HOST}/${ENTITY_NAMESPACE}/${APP_SLUG}:${IMAGE_TAG} locally.
Current repo example:
tools.playground.france-identite.gouv.fr/france-titres/hello-world:latest
Source: hello-world-main/docker-compose.yml
What Compose defines¶
Single service only:
- service name:
hello-world - image: fixed full registry path
- ports:
5173:5173
Source: hello-world-main/docker-compose.yml
No override files found.
Source: repository file scan (hello-world-main)
CI vs Compose¶
CI does not use Compose. CI uses direct Docker CLI (docker build, docker push).
Source: hello-world-main/.gitlab-ci.yml
Local and CI workflow differences¶
| Aspect | Local Compose | CI |
|---|---|---|
| Build | not defined (image: only) |
docker build -t $IMAGE:$TAG . |
| Push | manual | automated on main |
| Auth | local docker login if needed |
Harbor login in before_script |
| Tag source | image reference in compose file | pipeline TAG variable |
Sources:
- hello-world-main/docker-compose.yml
- hello-world-main/.gitlab-ci.yml
Practical usage commands¶
Networking/dependency model¶
- no service dependencies (
depends_onabsent) - no custom networks
- no volumes
- no env blocks
Source: hello-world-main/docker-compose.yml
Known port mismatch to consider in any deployment¶
Runtime container serves on 80, while Compose maps 5173:5173.
Impact: local access may fail unless container also listens on 5173.
Sources:
- hello-world-main/dockerfile
- hello-world-main/docker-compose.yml
Validation command: