-
Notifications
You must be signed in to change notification settings - Fork 508
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
Failure to expand environment variables properly cross-platform. #1134
Comments
I have found the same issue. to reproduce, the following compose file:
and execute
The following error is shown: Traceback (most recent call last):
File "/usr/bin/podman-compose", line 8, in <module>
sys.exit(main())
~~~~^^
File "/usr/lib/python3.13/site-packages/podman_compose.py", line 3711, in main
asyncio.run(async_main())
~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 194, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/base_events.py", line 720, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/podman_compose.py", line 3707, in async_main
await podman_compose.run()
File "/usr/lib/python3.13/site-packages/podman_compose.py", line 1861, in run
retcode = await cmd(self, args)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/podman_compose.py", line 2702, in compose_up
podman_args = await container_to_args(compose, cnt, detached=args.detach)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/podman_compose.py", line 1099, in container_to_args
podman_args.extend(get_net_args(compose, cnt))
~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/podman_compose.py", line 934, in get_net_args
return get_net_args_from_networks(compose, cnt)
File "/usr/lib/python3.13/site-packages/podman_compose.py", line 983, in get_net_args_from_networks
net_name = ext_desc.get("name") or net_desc.get("name") or default_net_name
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get I think the error message could be improved, as it did not say anything about unresolved environment vars (I found #1067 before reaching this issue) |
Also present on Arch, downgrading to 1.2.0 for now solves the issue. Error message could definitely be improved. It was certainly a surprise that a previously working docker-compose.yml stopped working. The only reason I didn't notice earlier is because I hadn't needed to update my container images in a while. |
ping |
v1.3.0 broke my dev setup on Windows. Bash-style environment variables under environment section in docker-compose.yml are passed through unresolved to podman (run) command-line.
NOT a bug in Podman.
Steps to reproduce the behavior:
Expected behavior
Environment variable values such as above should be passed through as already resolved (evaluated).
Actual behavior
Environment variable values are passed through raw (unresolved).
Output
Environment:
Additional context
This issue was did not manifest while using previous version from pip, probably because environment variables were not passed through at all ??
Solution/Workaround:
The text was updated successfully, but these errors were encountered: