Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows volume bindings do not work correctly with Rancher Desktop or Podman #1719

Closed
bergerst opened this issue Nov 7, 2023 · 0 comments · Fixed by #1720
Closed

Windows volume bindings do not work correctly with Rancher Desktop or Podman #1719

bergerst opened this issue Nov 7, 2023 · 0 comments · Fixed by #1720
Assignees

Comments

@bergerst
Copy link
Contributor

bergerst commented Nov 7, 2023

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant