The Override Engine
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
The single most important design decision in MultiDocker:
Overrides, not edits
Section titled “Overrides, not edits”When you register a project, MultiDocker writes a generated file to
~/.config/multi-docker/overrides/<name>.override.yml. It never opens, patches or rewrites
your original docker-compose.yml. Your repository stays exactly as your team committed it —
no MultiDocker-specific labels, no stripped ports, nothing to .gitignore.
The override is derived from a profile template and typically does three things:
- Strips host port mappings so parallel projects can’t collide on the host (see
Compose
!reset& Port Stripping). - Joins containers to the
edgenetwork (externalmulti-docker-edge) so Traefik can reach them. - Attaches Traefik labels that route
<host>.<base-domain>to the right service.
The COMPOSE_FILE chain
Section titled “The COMPOSE_FILE chain”The CLI runs docker compose with both your file and the generated override, using
Docker Compose’s built-in file-merging via the COMPOSE_FILE environment variable:
COMPOSE_FILE="<project>/docker-compose.yml:~/.config/multi-docker/overrides/<name>.override.yml" \ docker compose -p <name> up -dCompose merges the files left-to-right, so the override wins on any key it sets. If a project has port-conflict overrides, a third file is appended to the chain:
COMPOSE_FILE="<original>:<name>.override.yml:<name>.ports.yml"A worked example
Section titled “A worked example”A typical rendered override for a Shopware project looks like this:
services: proxy: ports: !reset [] networks: [default, edge] labels: - "traefik.enable=true" - "traefik.docker.network=multi-docker-edge" - "traefik.http.routers.aurora.rule=Host(`aurora.coding9.test`)" - "traefik.http.routers.aurora.entrypoints=websecure" - "traefik.http.routers.aurora.tls=true" - "traefik.http.services.aurora.loadbalancer.server.port=80" shop: ports: !reset [] environment: MAILER_DSN: "smtp://mailcatcher:1025" db: ports: !reset [] mailcatcher: profiles: ["off"] # local mailcatcher off — the central edge one takes over
networks: edge: name: multi-docker-edge external: trueNote the mailcatcher service being switched off via profiles: ["off"], and the db
having its host ports stripped — you reach the database through
OrbStack DNS or mdocker inspect instead of a host port.
Regenerating an override
Section titled “Regenerating an override”Overrides are pure functions of the registry state. Any time you add a hostname, change the base domain, or edit a profile, the affected overrides are re-rendered. You can also do it explicitly:
mdocker rerender <name>The generator (engine/render.sh) also filters out any service that doesn’t exist in your
original compose, so a profile template can safely mention optional services like
opensearch without breaking projects that lack them.
Cookie-Einstellungen
Statistik-Werkzeuge setzen wir nur ein, wenn du zustimmst. Die notwendige Speicherung hält die Seite funktionsfähig; alles andere bleibt aus, bis du entscheidest.
Speichert deine Entscheidung aus diesem Dialog in deinem Browser (localStorage). Kein Cookie, keine Weitergabe an Dritte.
Google Analytics 4 über den Google Tag Manager, um die Nutzung der Seite zu messen. Wird erst nach deiner Einwilligung geladen.