This repository was archived by the owner on Jun 2, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Variable Interpolation
github-actions[bot] edited this page May 17, 2026
·
1 revision
quadlet-compose supports variable interpolation in compose files using a string.Template subclass adapted from docker-compose v1, with .env file loading via python-dotenv.
Priority order (highest to lowest):
- CLI
--env KEY=VALUEflags -
.envfile (located alongside the compose file) - Shell environment variables (
os.environ)
Supported syntax:
-
$VAR/${VAR}— direct substitution -
$$— literal$escaping -
${VAR:-default}— default value if unset or empty -
${VAR-default}— default value if unset -
${VAR:?error}— error if unset or empty -
${VAR?error}— error if unset -
${VAR:+replacement}— replacement if set and non-empty -
${VAR+replacement}— replacement if set
Use --no-interpolate with config or convert to disable interpolation and see raw variable references.