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

查看:66
本文介绍了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?

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆