-
Notifications
You must be signed in to change notification settings - Fork 652
Description
Description
The docker-maven-plugin currently turns all Windows file paths (C:\Users\example/test.txt) into /c/Users/example/test.txt in EnvUtils.fixupPath.
This leads to problems when using Rancher Desktop or Podman instead of Docker Desktop. Since both of these tools only run in the WSL, the correct path in the WSL image would be /mnt/c/Users/example/test.txt . The /mnt/ part is currently missing.
However, both Rancher Desktop and Podman can already correct Windows paths into WSL paths if you call the Docker API with Windows file paths. So for example, docker run -d --name nginx -v C:\Users\example\test.txt:/tmp/test.txt nginx:latest
works.
Rancher Desktop and Podman have different behavior right now with the latest docker-maven-plugin release:
- Rancher Desktop creates an empty directory under /c/Users/example/test.txt
- Podman fails with
make cli opts(): making volume mountpoint for volume /c/Users/example/test.txt: mkdir /c: permission denied
This bug is somewhat related to #1713
Info
- docker-maven-plugin version : 0.43.4
- Maven version (
mvn -v
) :
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: C:\Development\maven
Java version: 11.0.14.1, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-11.0.14.1+1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
- Docker version : Rancher Desktop 1.8.1, Podman 4.7.2
- If it's a bug, how to reproduce :
- Install and start Podman on Windows using this guide: https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md
- If
podman pull nginx
does not work, you probably have to fix the DNS resolution in the WSL image with this fix: https://gist.github.com/ThePlenkov/6ecf2a43e2b3898e8cd4986d277b5ecf - Clone the sample project
- Run
mvn verify
, it should fail with thepermission denied
error
- Sample project : GitHub Clone URL