containers / containers/podman-compose

RuntimeError: volume not defined in top level

Open
#903 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

**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:

```yaml
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 "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Python312\Scripts\podman-compose.exe\__main__.py", line 7, in
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:**
- OS: Windows
- podman version: 5.0.0
- podman compose version: latest development

**Additional context**

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.