You will probably want to read up on volumes in Docker from the Docker
documentation (https://docs.docker.com/storage/volumes/).

On Thu, Jan 2, 2020 at 9:25 AM Ralph Connors <[email protected]> wrote:

> Thanks for your quick answer. I am new to both Docker and Jenkins - how do
> I do this?
>
> On Thu, Jan 2, 2020 at 11:19 AM Slide <[email protected]> wrote:
>
>> Why are you using an Alpine Linux image with Windows paths? If you want
>> to run a Linux container, you need to setup your volumes to use Linux paths
>> mapped to the Windows equivalent (if you are running this on a Windows
>> host).
>>
>> On Thu, Jan 2, 2020 at 9:14 AM Ralph Connors <[email protected]> wrote:
>>
>>> I am working through the Maven/Java Jenkins tutorial
>>> <https://jenkins.io/doc/tutorials/build-a-java-app-with-maven/>.
>>>
>>> I was able work up to running the Pipeline, but the following fails:
>>>
>>> docker run -d -t -v /root/.m2:/root/.m2 -w 
>>> C:/Users/ralph.connors/.jenkins/workspace/simple-java-maven-app/ -v 
>>> C:/Users/ralph.connors/.jenkins/workspace/simple-java-maven-app/:C:/Users/ralph.connors/.jenkins/workspace/simple-java-maven-app/
>>>  -v 
>>> C:/Users/ralph.connors/.jenkins/workspace/simple-java-maven-app@tmp/:C:/Users/ralph.connors/.jenkins/workspace/simple-java-maven-app@tmp/
>>>  -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 ******** maven:3-alpine cmd.exe
>>>
>>>
>>> [Pipeline] // withDockerContainer
>>> [Pipeline] }
>>> [Pipeline] // withEnv
>>> [Pipeline] }
>>> [Pipeline] // node
>>> [Pipeline] End of Pipeline
>>> java.io.IOException: Failed to run image 'maven:3-alpine'. Error: docker: 
>>> Error response from daemon: the working directory 
>>> 'C:/Users/ralph.connors/.jenkins/workspace/simple-java-maven-app/' is 
>>> invalid, it needs to be an absolute path.
>>> See 'docker run --help'.
>>>     at 
>>> org.jenkinsci.plugins.docker.workflow.client.WindowsDockerClient.run(WindowsDockerClient.java:57)
>>>     at 
>>> org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:199)
>>>     at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286)
>>>     at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
>>>     at 
>>> org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
>>>
>>>         ...
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/c9c89678-a100-4388-9595-fab157037fc5%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/c9c89678-a100-4388-9595-fab157037fc5%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Website: http://earl-of-code.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVcWQjW_cvCKoTBwPvMsM5DHMSTme4RFqe9mu5x3TvjJpg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVcWQjW_cvCKoTBwPvMsM5DHMSTme4RFqe9mu5x3TvjJpg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAHEJwYcvVoqr9ajui0BLnnqRMNJROVX04uWWRz%3D-7uffrzhA4w%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAHEJwYcvVoqr9ajui0BLnnqRMNJROVX04uWWRz%3D-7uffrzhA4w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Website: http://earl-of-code.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVcRTXhixy6O4F%3DP9fBQOAN2EHrKfNVkWeThhT-uEgVo5g%40mail.gmail.com.

Reply via email to