Pits using the Jenkins Docker container

Source: Internet
Author: User
Tags jenkins docker

1. When using MAVEN, the project first adds the auto-install MAVEN to the global Tool configuration and then adds the Maven top-level MAVEN targets in the project's build The Maven ID you just added is selected in version, otherwise the following error is reported:

Fatal:command Execution Failedjava.io.IOException:Cannot Run program ' MVN ' (in directory/var/jenkins_home/workspace/ Jettydocker "): error=2, No such file or Directoryat Java.lang.ProcessBuilder.start (processbuilder.java:1048) at Hudson. Proc$localproc.<init> (proc.java:240) at Hudson. Proc$localproc.<init> (proc.java:212) at Hudson. Launcher$locallauncher.launch (launcher.java:815) at Hudson. Launcher$procstarter.start (launcher.java:381) at Hudson. Launcher$procstarter.join (launcher.java:388) at Hudson.tasks.Maven.perform (maven.java:331) at Hudson.tasks.buildstepmonitor$1.perform (buildstepmonitor.java:20) at hudson.model.abstractbuild$ Abstractbuildexecution.perform (abstractbuild.java:779) at Hudson.model.build$buildexecution.build (Build.java:205 ) at Hudson.model.build$buildexecution.dorun (build.java:162) at hudson.model.abstractbuild$ Abstractbuildexecution.run (abstractbuild.java:534) at Hudson.model.Run.execute (run.java:1741) at Hudson.model.FreeStyleBuild.run (freestylebuild.java:43) at HudsoN.model.resourcecontroller.execute (resourcecontroller.java:98) at Hudson.model.Executor.run (executor.java:410) caused by:java.io.ioexception:error=2, No such file or Directoryat java.lang.UNIXProcess.forkAndExec (Native Method) at J Ava.lang.unixprocess.<init> (unixprocess.java:248) at Java.lang.ProcessImpl.start (processimpl.java:134) at Java.lang.ProcessBuilder.start (processbuilder.java:1029) ... More

2. Giant pits:

Click on the bottom right side of any path in the Kitematic interface, the dialog will pop up, and if you choose enable volumes four bad things will happen:

1. Force restart of Jenkins server, even if a job is not completed;

2. Re-install Jenkins plugin after reboot;

3. A docker command that causes Jenkins to be unable to use Dood.

3.admin user's password will change.

So remember not to click the Enable volumes at any time using the Jenkins container.

Workaround:

Stop (remove) Docker, rerun the following command and configure the new Jenkins container.

docker run  -d -v /var /run/dockersock:/var/run/docker sock \

-v $(which Docker):/usr/bin/docker -p 8080:8080 myjenk  If you need to see it, you can refer to the Backup and Reuse blog of the Jenkins container duplicate a same Jenkins container to view.

Pits using the Jenkins Docker container

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.