首页 > 其他 > 详细

Jenkins官方Docker镜像

时间:2019-12-01 00:42:13      阅读:78      评论:0      收藏:0      [点我收藏+]

Jenkins官方Docker镜像在原有的基础上添加了一些基础东西。

 

一. source.list文件, 更换国内源

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

 

二. Dockerfile文件

FROM jenkins/jenkins:2.190.3 
USER root
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\ 
    echo ‘Asia/Shanghai‘ >/etc/timezone
ADD sources.list /etc/apt/sources.list
RUN apt-get update -y
ADD get-docker.sh /get-docker.sh
RUN wget https://yum.dockerproject.org/gpg && apt-key add gpg 
RUN curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg | apt-key add -
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - &&     apt-key fingerprint 0EBFCD88 
RUN apt-get install -y       apt-transport-https       ca-certificates       curl       gnupg2       software-properties-common       vim
RUN add-apt-repository    "deb [arch=amd64] https://download.docker.com/linux/debian     $(lsb_release -cs)     stable" &&     sed -i ‘s/download.docker.com/mirrors.ustc.edu.cn\/docker-ce/g‘ /etc/apt/sources.list
RUN apt-get update -y
RUN echo "    StrictHostKeyChecking no" >> /etc/ssh/ssh_config &&    /get-docker.sh

Jenkins官方Docker镜像

原文:https://www.cnblogs.com/zhangzihong/p/11964330.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!