DICOM:Docker实现增量发布之前期准备

本文探讨如何利用Docker实现增量发布,通过Dockerfile创建Docker镜像,重点讲解FROM、ADD和COPY指令。文中详细介绍了解决CentOS网络问题、下载Docker镜像的步骤,并提供了具体的Dockerfile示例,展示如何将本地文件添加到镜像中,以便于自动化和增量发布DICOM服务。
摘要由CSDN通过智能技术生成

背景:

为了方便整体产品的发布,希望通过docker实现增量发布。大致的思路如下:
is-there-a-way-to-add-only-changed-files-to-a-docker-image-as-a-new-layer-with。本博文对这种方式进行了尝试,与此同时简单介绍如何通过Dockerfile来创建Docker镜像。

前期准备:

  1. 解决centos的网络问题【can not find a valid baseurl for repo: base/7/x86_64】,使用dhclient命令
    http://stackoverflow.com/questions/30424860/yum-error-centos-7-1-x86-64
  2. 解决下载docker官方镜像问题【Docker - dial tcp: lookup index.docker.io: no such host - Solution】,解决方案:https://linuxconfig.org/docker-dial-tcp-lookup-index-docker-io-no-such-host-fix
    这里写图片描述
  3. centos命令行中解析json串。【How to parse JSON string via command line on Linux】,使用一个开源库,详情参考:http://xmodulo.com/how-to-parse-json-string-via-command-line-on-linux.html
    【备注】:建议在windows下先下载jq库,然后再使用pscp等工具上传到linux中,我在多款linux系统下尝试使用wget直接下载,速度卡的要死。

docker镜像和容器再学习:

1. docker image

官方的解释
- 镜像:An image is a filesystem and parameters to use at runtime. It doesn’t have state and never changes.
- 容器:A container is a running instance of an image.
- 引擎:When you ran the command, Docker Engine:
(1)checked to see if you had the hello-world software image;
(2)downloaded the image from the Docker Hub (more about the hub later);
(3)loaded the image into the container and “ran” it

我们之所以使用docker,就如同他的logo中的集装箱一样:通过docker镜像来创建和

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zssure

己欲立而立人,己欲达而达人

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值