podman-compose
podman-compose copied to clipboard
Support `configs:`
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. :smiley:
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
I agree, this is part of the compose-spec, podman-compose really ought to support it!