Skip to content

Support configs: from Compose spec#1473

Open
overhacked wants to merge 5 commits into
containers:mainfrom
overhacked:overhacked/configs-compose-spec
Open

Support configs: from Compose spec#1473
overhacked wants to merge 5 commits into
containers:mainfrom
overhacked:overhacked/configs-compose-spec

Conversation

@overhacked

Copy link
Copy Markdown

configs: and services.*.configs: allow content specified in the compose file, in environment variables, in local files, and in OCI artifacts to be mounted in the container. They are similar to volume-mounting a single file but with more options for where the content is stored. See https://github.com/compose-spec/compose-spec/blob/main/08-configs.md and https://github.com/compose-spec/compose-spec/blob/main/05-services.md#configs for details.

Resolves #835.

@overhacked overhacked force-pushed the overhacked/configs-compose-spec branch from 1b3ea5d to 4c29688 Compare June 6, 2026 23:55
Configs allow content specified in the compose file, in environment variables, in local files, and
in OCI artifacts to be mounted in the container. They are similar to volume-mounting a single file
but with more options for where the content is stored.
See https://github.com/compose-spec/compose-spec/blob/main/08-configs.md and
https://github.com/compose-spec/compose-spec/blob/main/05-services.md#configs for details.

Resolves containers#835.

Signed-off-by: Ross Williams <ross@ross-williams.net>
Functions under test:

- `container_to_args_configs`
  - Correctly convert service.configs to podman create arguments
  - For environment and content configs, idempotently create artifacts
    and re-create when content modified on subsequent runs of compose up
  - For external configs, check for artifact existence
- `compose_down`
  - Delete config artifacts if they were created by podman compose
  - Use dependency logic to determine if any config artifacts should be
    excluded from deletion

Signed-off-by: Ross Williams <ross@ross-williams.net>
@overhacked overhacked force-pushed the overhacked/configs-compose-spec branch 2 times, most recently from 2cfbc64 to e783a05 Compare June 7, 2026 00:50
Configs rely on podman artifact support, which was stabilized in 5.6.0.

Signed-off-by: Ross Williams <ross@ross-williams.net>
Signed-off-by: Ross Williams <ross@ross-williams.net>
@overhacked overhacked force-pushed the overhacked/configs-compose-spec branch from 93b832b to 7a5f2c8 Compare June 7, 2026 02:16
@overhacked overhacked marked this pull request as ready for review June 7, 2026 12:50
Comment thread podman_compose.py Outdated
@p12tic

p12tic commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Rather large PR, will take some time to review.

Mistake apply XOR logic to mutually-exclusive parameters

Signed-off-by: Ross Williams <ross@ross-williams.net>
@overhacked

overhacked commented Jun 22, 2026

Copy link
Copy Markdown
Author

Understandable. Most of the line count is tests, though. Changes to podman_compose.py core adds <250 lines.

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.

Support configs:

2 participants