Skip to content

Support configs: #835

@jmaibaum

Description

@jmaibaum

Is your feature request related to a problem? Please describe.
I tried to run https://git.sr.ht/~emersion/sr.ht-container-compose/ which requires configs: support. However, I always got "No such file or directory" errors being displayed for all defined configs.

Describe the solution you'd like
Full support for configs: would be the preferred solution. 😃

Describe alternatives you've considered
I don't really think there is an alternative to supporting configs, because, if a compose file uses (and thus requires) them, you cannot use podman-compose right now.

Additional context
https://docs.docker.com/compose/compose-file/05-services/#configs
https://docs.docker.com/compose/compose-file/08-configs/

Minimal example

$ cat compose.yaml 
configs:
  my_config:
    file: ./my_config.ini
services:
  busybox:
    image: busybox:latest
    command: /bin/sh -c "id; ls -lash /; cat /my_config.ini"
    configs:
      - my_config
$ cat my_config.ini 
[config]
key=value
$ podman compose up
>>>> Executing external compose provider "/usr/bin/podman-compose". Please refer to the documentation for details. <<<<

podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.9.0
...
podman start -a podman-compose-test_busybox_1
[busybox] | uid=0(root) gid=0(root) groups=10(wheel)
[busybox] | total 4K     
[busybox] |       0 dr-xr-xr-x   14 root     root          26 Feb  7 21:19 .
[busybox] |       0 drwxr-xr-x    2 root     root        4.6K Jan 17 21:58 bin
[busybox] |       0 drwxr-xr-x    5 root     root         340 Feb  7 21:19 dev
[busybox] |       0 drwxr-xr-x    3 root     root          56 Feb  7 21:19 etc
[busybox] |       0 drwxr-xr-x    2 nobody   nobody         0 Jan 17 21:59 home
[busybox] |       0 drwxr-xr-x    2 root     root         270 Jan 17 21:58 lib
[busybox] |    4.0K lrwxrwxrwx    1 root     root           3 Jan 17 21:58 lib64 -> lib
[busybox] |       0 dr-xr-xr-x  353 nobody   nobody         0 Feb  7 21:19 proc
[busybox] |       0 drwx------    2 root     root           0 Jan 17 21:59 root
[busybox] |       0 drwxr-xr-x    3 root     root          80 Feb  7 21:19 run
[busybox] |       0 dr-xr-xr-x   13 nobody   nobody         0 Feb  7 08:09 sys
[busybox] |       0 drwxrwxrwt    2 root     root           0 Jan 17 21:59 tmp
[busybox] |       0 drwxr-xr-x    4 root     root          14 Jan 17 21:59 usr
[busybox] |       0 drwxr-xr-x    4 root     root          16 Jan 17 21:59 var
cat: can't open '/my_config.ini': No such file or directory
exit code: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions