Skip to content

Unable to bind mount Windows host volume #754

@liangming2003

Description

@liangming2003

I failed to map the X: drive to drive G: in the container in container settings of Docker plugin 1.1.8.

Anyone know what' wrong with it? Thanks.

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

DockerPlugin
DockerPlugin2

Here is command I run to map the volume. I want to dynamically provision build agent using docker plugins.

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

Here is the 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:\'	at com.github.dockerjava.api.model.Bind.parse(Bind.java:134)	at com.nirima.jenkins.plugins.docker.DockerTemplateBase.fillContainerConfig(DockerTemplateBase.java:579)	at com.nirima.jenkins.plugins.docker.DockerTemplate.fillContainerConfig(DockerTemplate.java:224)	at com.nirima.jenkins.plugins.docker.DockerTemplate.doProvisionNode(DockerTemplate.java:547)	at com.nirima.jenkins.plugins.docker.DockerTemplate.provisionNode(DockerTemplate.java:526)	at com.nirima.jenkins.plugins.docker.DockerCloud$1.run(DockerCloud.java:364)	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)	at java.util.concurrent.FutureTask.run(FutureTask.java:266)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)	at java.lang.Thread.run(Thread.java:748)

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFEA Request for Enhancement. Usually linked to a PR that follows it.dependenciesDependencies

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions