• Jenkins官方Docker镜像


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

    一. sources.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
  • 相关阅读:
    AOP概述
    AOP-动态代理
    IOC容器和Bean的配置
    Spring框架概述
    异常
    Optional 类
    Stream API
    方法引用(Method References)
    函数式(Functional)接口
    stm8笔记1-搭建工程+孤独的小灯闪烁
  • 原文地址:https://www.cnblogs.com/zhangzihong/p/11964330.html
Copyright © 2020-2023  润新知