Skip to content

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

@bergerst

Description

@bergerst

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"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions