I am using podman-compose
instead of docker-compose
.
My docker-compose.yml
had no problems when using docker-compose
, but it makes an error with podman-compose
.
docker-compose.yml
:
version: "3.9"
services:
mysql:
image: docker.io/mysql
container_name: mysql
hostname: mysql
volumes:
- D:\mysql\test\data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "password"
MYSQL_TCP_PORT: 8026
ports:
- "8026:8026"
When podman-compose up
:
['podman', '--version', '']
using podman version: 4.3.1
** excluding: set()
Traceback (most recent call last):
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\Scripts\podman-compose.exe\__main__.py", line 7, in <module>
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\site-packages\podman_compose.py", line 1775, in main
podman_compose.run()
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\site-packages\podman_compose.py", line 1024, in run
cmd(self, args)
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\site-packages\podman_compose.py", line 1248, in wrapped
return func(*args, **kw)
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\site-packages\podman_compose.py", line 1415, in compose_up
podman_args = container_to_args(compose, cnt, detached=args.detach)
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\site-packages\podman_compose.py", line 644, in container_to_args
podman_args.extend(get_mount_args(compose, cnt, volume))
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\site-packages\podman_compose.py", line 399, in get_mount_args
if is_str(volume): volume = parse_short_mount(volume, basedir)
File "C:\Users\ymy\AppData\Local\Programs\Python\Python310\lib\site-packages\podman_compose.py", line 129, in parse_short_mount
raise ValueError("unknown mount option "+opt)
ValueError: unknown mount option /var/lib/mysql
I think that it read colon(:
) at Windows drive(D:
) as delimeter so the last field /var/lib/mysql
is read as options like ro
, rw
. But I don't know how I can solve this.
This page (https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md) gives a definition for 'Unixy' Windows paths. my references then went from: d:/path to /d/path Have a look and let us know how you get on