install Docker

System Requirements:

  • Windows 10 64bit: Pro, Enterprise or Education (Build 15063 or later).
  • Virtualization is enabled in BIOS. Typically, virtualization is enabled by default. This is different from having Hyper-V enabled. For more detail see Virtualization must be enabled in Troubleshooting.
  • CPU SLAT-capable feature.
  • At least 4GB of RAM.

download DockerCE for windows

下载安装后验证
`
docker info`
image.png


install jenkins

cmd命令窗口执行下述命令

  1. docker run ^
  2. --rm ^
  3. -u root ^
  4. -p 8080:8080 ^
  5. -v jenkins-data:/var/jenkins_home ^
  6. -v /var/run/docker.sock:/var/run/docker.sock ^
  7. -v "%HOMEPATH%:/home ^
  8. jenkinsci/blueocean
  9. #"%HOMEPATH%"为用户目录

执行完毕后访问 http://127.0.0.1:8080
image.png
提示需要通过日志访问密码
docker log <containerID/name>
Inked1558584000350-b667fbdf-4741-485b-9c6a-effe532931be_LI.jpg


install plug

image.png

使用Maven构建流水线

  1. docker run ^
  2. -u root ^
  3. --rm ^
  4. -d ^
  5. -p 8080:8080 ^
  6. -p 50000:50000 ^
  7. -v jenkins-data:/var/jenkins_home ^
  8. -v /var/run/docker.sock:/var/run/docker.sock ^
  9. jenkinsci/blueocean