-
Notifications
You must be signed in to change notification settings - Fork 323
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 'invalid volume specification' #666
Comments
FYI the plugin doesn't build a command to Much as I hate to dampen your enthusiasm, I think that this one is going to be non-trivial to sort. The existing jenkinsci infrastructure (used to test this plugin) does not provide us with Windows executors that have docker installed, so we can't put in unit-tests to ensure that docker-on-Windows works. So, with that in mind, I'd suggest that we start with details of the pipeline you're running. i.e. the code. Lastly, before we go delving into the nerdy details, one thing I would suggest that you check is proper "escaping" of backslashes. I have a heterogeneous environment at work with a mix of Windows and unix and if I had a pound/dollar for every time someone had written |
Regarding your usage pattern, I've actually not used docker in the way form Jenkins. I am not sure if it was this plugin I was using before, but I was able to use a pipeline, like below, and Jenkins would take care of creating the container for me; it even supported having a 'dockerfile' within your repo and just building it on demand as part of the pipeline. That behaviour is all following what is described on the Jenkins piepline documentation. Again there is a chance that I am simply using a different plugin compared to what I was using before. There is no escaping for me to check, as the volume mounting of the workspace into the container is managed automatically. Here is the pipeline that I've been testing this with. As you can see, it's very basic, I'm only looking to get the container started at this stage.
And here is the stack trace for the error that I get.
|
Hmm, yes, I can see that the pipeline code is fairly basic. So I took a (brief) look at the docker hub page for the microsoft/dotnet:2.1-sdk image and it says that it is "designed to be used both as a throw away container (mount your source code and start the container to start your app)". ...that said, I delved deeper into the dotnet docker documentation by going to its source repository, then following the 2.1-sdk link which looks like it's 100% unix and nothing from Windows at all, which makes me question the idea that the E: stuff could be coming from the docker image. What kind of docker daemon is Jenkins talking to? |
Well, the way I've used pipelines before, I've never had to do anything special regarding volumes. It was always Jenkins that was looking that the path to the workspace where the build was started, and then sharing that into the image at the exact same path. I believe there is a variable that Jenkins manges that set's what the workspace path is. This could be some issue that image I am using is not design for running on Windows, I am new to this aspect. I have a suspicion that you might need to ensure that the image you are using is designed from the ground up to be run as a Windows image, not a Linux image. |
I have the same issue. Jenkins is running on Ubuntu / Linux. I test with this.
And get this error.
|
|
...well, that would explain why I didn't recognize any of what was being discussed :-) |
Please don't use the issue tracker to ask questions, join jenkins-users mailing list.
If you get some troubles with docker-plugin, please report
Seems whatever way this plugin is building the command for 'docker run' it is not happy for docker on Windows. I have seen that for docker-compose there is an option to convert to Windows paths.
The text was updated successfully, but these errors were encountered: