Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--env-file doesnt work anymore resulting in Error: invalid reference format #1112

Closed
D3I5 opened this issue Jan 17, 2025 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@D3I5
Copy link

D3I5 commented Jan 17, 2025

Describe the bug
suddenly the --env-file option doesnt work anymore. Placesholders in the .yaml-file stay empty or use the default option. I cant pinpoint a specfic data on which it broke.

To Reproduce

./hello_world/docker_compose.yaml:

version: "3.5"
services:
hallo-welt:
image: hello-world:${D_VERSION}

./hello_world/config/hello_world.env:

D_VERSION="nanoserver"

command I run:
sudo podman-compose -f hello_world/docker_compose.yaml --env-file hello_world/config/hello_world.env up -d

Expected behavior
no Error: invalid reference format

Actual behavior
Error: invalid reference format

Output

$ sudo podman-compose -f hello-world/docker-compose.yaml --env-file hello-world/config/hello_world.env up -d
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.2.0
** excluding:  set()
['podman', 'ps', '--filter', 'label=io.podman.compose.project=hello-world', '-a', '--format', '{{ index .Labels "io.podman.compose.config-hash"}}']
['podman', 'network', 'exists', 'hello-world_default']
podman run --name=hello-world_hallo-welt_1 -d --label io.podman.compose.config-hash=6b92d9bd54ff2a485d41fd58382b73703d56a9e01ef4e2045ac7855a758c594f --label io.podman.compose.project=hello-world --label io.podman.compose.version=1.0.6 --label [email protected] --label com.docker.compose.project=hello-world --label com.docker.compose.project.working_dir=/opt/podman/hello-world --label com.docker.compose.project.config_files=hello-world/docker-compose.yaml --label com.docker.compose.container-number=1 --label com.docker.compose.service=hallo-welt --net hello-world_default --network-alias hallo-welt hello-world:
Error: invalid reference format
exit code: 125
podman start hello-world_hallo-welt_1
Error: no container with name or ID "hello-world_hallo-welt_1" found: no such container
exit code: 125
$ sudo podman-compose version
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.2.0
podman-compose version 1.0.6
podman --version
podman version 4.2.0
exit code: 0

Environment:

  • Red Hat Enterprise Linux 8.7 (Ootpa)

Additional context

Workaround:
copy the env-file into the directory of the .yaml file and name ist ".env", the just run sudo podman-compose -f hello-world/docker-compose.yaml up -d

Can someone reproduce this?

@D3I5 D3I5 added the bug Something isn't working label Jan 17, 2025
@rjeffman
Copy link
Contributor

This seems to be a symptom of issue #1059.

@D3I5
Copy link
Author

D3I5 commented Jan 21, 2025

Thank you for mentioning that issue. Since I do not rely on relative paths I updated to 1.3.0 and started to use static paths. Works great. THX

@D3I5 D3I5 closed this as completed Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants