构建
FROM centos:7
COPY *.repo /etc/yum.repos.d/
COPY *.rpm /
COPY daemon.json /etc/docker/
RUN yum makecache all
RUN yum update -y
RUN yum install /*.rpm -y && yum install git maven docker-ce kubelet kubeadm kubectl unzip which zip -y && curl -s "https://get.sdkman.io" | bash && source "/root/.sdkman/bin/sdkman-init.sh" && sdk install gradle 6.0.1
docker build -t 192.168.1.111/jeebiz/centos-7-devops .
docker login -ujenkins -pJenkins123 192.168.1.111
docker push 192.168.1.111/jeebiz/centos-7-devops:latest
FROM centos-7-devops:latest
RUN yum install jenkins
RUN cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
http://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
作者:Jeebiz 创建时间:2019-12-20 18:39
更新时间:2023-12-28 09:15
更新时间:2023-12-28 09:15