Flask接口签名sign原理与实例代码浅析
266
2022-11-02
Jenkins 构建镜像以及上传镜像
[root@jenkins-agent devops-web-service-master]# ls dist/index.html static[root@jenkins-agent devops-web-service-master]# cat Dockerfile FROM nginx:1.17.7COPY dist/ /usr/share/nginx/html[root@jenkins-agent devops-web-service-master]# docker build -t npm:1 .Sending build context to Docker daemon 184.2MBStep 1/2 : FROM nginx:1.17.7 ---> c7460dfcab50Step 2/2 : COPY index.html /usr/share/nginx/html ---> bd119bfc6566Successfully built bd119bfc6566Successfully tagged npm:1[root@jenkins-agent devops-web-service-master]# docker run -itd -p 89:80 --name npm npm:12810ba5f6c162218ddfe2d8424c501aa7a1fc4aacabf08b545cad8fb64ee9112
stage("PushImages"){ steps { script { sh """ docker login 192.168.100.4:88 docker build -t npm:1 . docker tag npm:1 192.168.100.4:88/devops/npm:1 docker push 192.168.100.4:88/devops/npm:1 """ } } }[Pipeline] { (PushImages)[Pipeline] script[Pipeline] {[Pipeline] sh+ docker login 192.168.100.4:88Authenticating with existing credentials...WARNING! Your password will be stored unencrypted in /root/.docker/config.json.Configure a credential helper to remove this warning. SeeSucceeded+ docker build -t npm:1 .Sending build context to Docker daemon 156.6MBStep 1/2 : FROM nginx:1.17.7 ---> c7460dfcab50Step 2/2 : COPY dist/ /usr/share/nginx/html ---> 9df39ec2d5e1Successfully built 9df39ec2d5e1Successfully tagged npm:1+ docker tag npm:1 192.168.100.4:88/devops/npm:1+ docker push 192.168.100.4:88/devops/npm:1The push refers to repository [192.168.100.4:88/devops/npm]2096de65a60b: Preparingc26e88311e71: Preparing17fde96446df: Preparing556c5fb0d91b: Preparingc26e88311e71: Pushed2096de65a60b: Pushed17fde96446df: Pushed556c5fb0d91b: Pushed1: digest: sha256:9dbc7628506d12d4dc4951073f8a7e060aa26945bfdba125b32d5392beaeaac8 size: 1158[Pipeline] }[Pipeline] // script[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineFinished: SUCCESS
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~