containers / podman-compose

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

Podman-compose mount volume incorrectly under Windows with podman machine on WSL #938

Open ohhappy1986 opened 4 months ago

ohhappy1986 commented 4 months ago

Issue Description

When using podman-compose to bring up below container. The volume mapping is incorrectly mapped, it automatically adds "/mnt/d" before each of the volume entry in compose file.

podman-compose v1.1.0

Compose file below:

services: ibml: image: /nvidia/cuda container_name: ibml_engine build: context: .\IBML args: APP_VERSION: latest volumes:

If you inspect the container which it brought up. You can see volumes are mount as below /mnt/d/mnt/e/Data:/mnt/e/Data /mnt/d/mnt/d/Logs:/mnt/d/Logs

Steps to reproduce the issue

Steps to reproduce the issue

  1. Save the posted compose file into compose.yaml file
  2. Run podman-compose -f compose.yaml up -d
  3. Inspect the container using Docker desktop or command line

Describe the results you received

The volume mounted as /mnt/d/mnt/e/Data:/mnt/e/Data /mnt/d/mnt/d/Logs:/mnt/d/Logs

Describe the results you expected

Then volume should be mounted as /mnt/e/Data:/mnt/e/Data /mnt/d/Logs:/mnt/d/Logs

podman info output

OS: windows/amd64
provider: wsl
version: 5.0.2

https://github.com/containers/podman/issues/22684