jenkins docker项目

https://www.cnblogs.com/woshimrf/p/jenkins-pipeline.html

安装插件

(本机docker不需要)开启docker远程访问

vi /lib/systemd/system/docker.service

修改为

ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock

(本机docker不需要)jenkins添加docker builder,连接测试

构建镜像和推送到阿里

Dockerfile最好放在SCM上,这里是在jenkins里自己创建一个

容器镜像服务的账号,加到凭证里,用vpc网络的镜像地址登陆

仓库的格式是 命名空间/仓库名。推送时仓库名会自动创建

build_number作为tag打到镜像上

发布到k8s

https://www.cnblogs.com/keithtt/p/6410229.html

原文地址:https://www.cnblogs.com/jabbok/p/12890829.html