containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
4.86k stars 465 forks source link

RuntimeError: volume not defined in top level #903

Open virzak opened 3 months ago

virzak commented 3 months ago

Describe the bug

Cannot use mount point like \wsl.localhost with podman compose.

To Reproduce

Install Ubuntu on WSL - https://ubuntu.com/desktop/wsl

Create yaml file:

version: "3"

services:
  simple:
    image: alpine
    volumes:
      - \\wsl.localhost\Ubuntu:/ub

run podman compose -f docker-compose.yml up

Expected behavior Should return success

Actual behavior returns error.

Output

šŸš€  podman-compose version           
podman-compose version 1.0.7
podman.exe version 5.0.0

šŸš€  podman-compose -f docker-compose.yml up
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python312\Scripts\podman-compose.exe\__main__.py", line 7, in <module>
  File "C:\Python312\Lib\site-packages\podman_compose.py", line 3245, in main
    asyncio.run(async_main())
  File "C:\Python312\Lib\asyncio\runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\base_events.py", line 685, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\podman_compose.py", line 3241, in async_main
    await podman_compose.run()
  File "C:\Python312\Lib\site-packages\podman_compose.py", line 1569, in run
    self._parse_compose_file()
  File "C:\Python312\Lib\site-packages\podman_compose.py", line 1792, in _parse_compose_file
    raise RuntimeError(f"volume [{vol_name}] not defined in top level")
RuntimeError: volume [\\wsl.localhost\Ubuntu] not defined in top level

Environment:

Additional context

This is an absolute must to be able to use docker-compose with vscode.