Unable to bind mount Windows host volume in Docker plugin

Expected behavior

Here is command I run to bind mount the volume and it works. now I want to dynamically provision build agent using docker plugin.

docker run -d --name agent-00 --restart=always -v X:\:G: -e JENKINS_MASTER_HOST=docker -e JENKINS_AGENT_ID=WIN_00 -e JENKINS_SECRET=xxxxx jenkins-agent:latest

but docker-java code (used by docker plugin) does not support windows path volume, following bind mount is not recognized cause it contains more than one colon.


Error Message:

Note: Disabled 29 sec ago due to error. Will re-enable in 4 min 30 sec.
Reason: Template provisioning failed.

java.lang.IllegalArgumentException	at com.github.dockerjava.api.model.Bind.parse(Bind.java:130)Caused: java.lang.IllegalArgumentException: Error parsing Bind 'X:\:G:\'

Is there any workaround for this problem,for example, a windows path without colon that can be recognized by docker on windows? Thanks.

Actual behavior


X: drive is a remote SMB share on Docker host (Windows server 2019)

Docker plugin settings:

The pull request for Windows volume parsing fix.

Steps to reproduce the behavior