编程技术网

关注微信公众号,定时推送前沿、专业、深度的编程技术资料。

 找回密码
 立即注册

QQ登录

只需一步,快速开始

极客时间

docker-in-docker(dind)服务在gitlab ci中的作用:Role of docker-in-docker (dind) service in gitlab ci

GDegrove 云计算 2022-5-10 14:50 8人围观

腾讯云服务器
docker-in-docker(dind)服务在gitlab ci中的作用的处理方法

根据官方 gitlab文档是在 ci 管道中启用 docker build 的一种方法,是利用 dind 服务(以> gitlab-ci 服务).

According to the official gitlab documentation, one way to enable docker build within ci pipelines, is to make use of the dind service (in terms of gitlab-ci services).

但是,就像在docker executor上运行ci作业的情况一样,还需要 docker:latest 映像.

However, as it is always the case with ci jobs running on docker executors, the docker:latest image is also needed.

有人可以解释:

  • docker:dind docker:latest 图像之间有什么区别?
  • (最重要的是):为什么两者都是服务和所需的docker映像(例如,如
  • what is the difference between the docker:dind and the docker:latest images?
  • (most importantly): why are both the service and the docker image needed (e.g. as indicated in this example, linked to from the github documentation) to perform e.g. a docker build whithin a ci job? doesn't the docker:latest image (within which the job will be executed!) incorporate the docker daemon (and I think the docker-compose also), which are the tools necessary for the commands we need (e.g. docker build, docker push etc)?

除非我错了,否则问题或多或少变成了:

Unless I am wrong, the question more or less becomes:

为什么Docker客户端和Docker守护程序不能驻留在相同的Docker(已启用)容器中

Why a docker client and a docker daemon cannot reside in the same docker (enabled) container

问题解答

docker:dind和docker:latest映像之间有什么区别?

what is the difference between the docker:dind and the docker:latest images?

腾讯云服务器 阿里云服务器
关注微信
^