Jenkins on Docker

https://hub.docker.com/_/jenkins/

环境搭建

# 启动 jenkins
docker run -d -p 8080:8080 -p 50000:50000 --add-host  -v /var/jenkins:/var/jenkins_home --name jenkins jenkins:2.60.3
  1. jenkins 更换源

docker 镜像制作过程中更换源,可参考下文:
https://segmentfault.com/q/1010000007151917/a-1020000007188147

deb http://mirrors.163.com/debian/  stretch main non-free contrib
deb http://mirrors.163.com/debian/  stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/  stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/  stretch main non-free contrib
deb-src http://mirrors.163.com/debian/  stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/  stretch-backports main non-free contrib
deb http://mirrors.163.com/debian-security/  stretch/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/  stretch/updates main non-free contrib
  1. 安装 dotnet core sdk 2.0.2

  2. docker exec -u 0 -it jenkins bash 以 root 用户登录

    原文作者:alfredking12
    原文地址: https://www.jianshu.com/p/47c99e2d954d
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞