Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Component/s: docker-commons-plugin, docker-workflow-plugin
-
Labels:None
-
Similar Issues:
Description
It seems that ":z" volume bind mount flag in docker is not suported for windows containers.
For jenkinsfile:
pipeline { agent { docker { image 'mksondej/aspnet-node-msbuild' } } stages { stage('Test') { steps { powershell 'ls' } } } }
Here's what my pipeline tries to execute:
docker run -t -d -u 18:18 -w "C:\Program Files (x86)\Jenkins\workspace\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA" -v "C:\Program Files (x86)\Jenkins\workspace\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA:C:\Program Files (x86)\Jenkins\workspace\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA:rw,z" -v "C:\Program Files (x86)\Jenkins\workspace\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA@tmp:C:\Program Files (x86)\Jenkins\workspace\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA@tmp:rw,z" -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** mksondej/aspnet-node-msbuild cat
and the result is:
java.io.IOException: Failed to run image 'mksondej/aspnet-node-msbuild'. Error: docker: Error response from daemon: invalid bind mount spec "C:\\Program Files (x86)\\Jenkins\\workspace\\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA:C:\\Program Files (x86)\\Jenkins\\workspace\\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA:rw,z": invalid volume specification: 'C:\Program Files (x86)\Jenkins\workspace\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA:C:\Program Files (x86)\Jenkins\workspace\test1_master-X2GYJHOEIWFTSVMPO3GB3GYF3NB4R7IFICRXKGCY7NVNWOUOC5QA:rw,z'
It seems that running windows containers in the pipeline is currently impossible?
By manually fiddling with the command above I've found out that without ":z" ("rw" can stay) it would work properly. I've tried to make a crude workaround by making a bat cmd somewhere in my PATH which would make a simple string replacement, but it only worked from my or other user's command line. The pipeline seems to run docker.exe directly.
Any wokaround would be more than welcome, thanks
Attachments
Issue Links
- relates to
-
JENKINS-36776 Support Windows Server Containers
-
- Resolved
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
,z and -u as well, does not supported...