-
Notifications
You must be signed in to change notification settings - Fork 531
Open
Labels
bugSomething isn't workingSomething isn't working
Description
podman-compose deviates from docker-compose in
- that it does not interpolate strings in .env files, and
- that it does not know about host env vars in .env (like $HOME, $PWD etc)
To Reproduce
FILE: .env
A=bar
B=foo$A
C=$HOME/foo
D="${XDG_DATA_HOME:-$HOME/.local/share}/blabla"
FILE: docker-compose.yml
version: "4"
services:
variables:
image: busybox
command: ["/bin/busybox", "sh", "-c", "export | grep EXAMPLE"]
environment:
EXAMPLE_SIMPLE: "$B"
EXAMPLE_HOSTVAR_SIMPLE: $C
EXAMPLE_HOSTVAR_COMPLEX: $D
Commands
$ podman-compose config
Expected behavior
All the variables should be substituted as you would expect. Note that docker-compose config
just works as expected.
Also no need to explicitly pass around variables with -e from when invoking docker-compose.
Actual behavior
Actual behaviour is that $B evaluates to literally foo$A, meaning it doesn't interpolate its value.
$C and $D results in errors, as podman-compose doesn't know about $HOME at all.
Output
$ podman-compose version
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.5.0
podman-compose version 1.0.6
podman --version
podman version 4.5.0
Environment:
Linux 6.1.31-2
Additional context
Current tests in repo do not test equality of output between docker-compose and podman-compose. That would possibly make your life easier to keep feature parity.
melroy89, herzenschein, Franbo, iwane-pl, krarey and 7 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working