I'm wondering that most of tutorials for the configuration of .gitlab-ci.yml
use the image: docker
or image: docker/compose
.
In my case we have a pre-installed docker and docker-compose on our virtual machine (Linux).
image
definition?dind
(Docker-in-Docker) functionality, is that necessary in my case?
- So is it necessary to use a image definition?
No, as mentioned in " Using Docker images "
GitLab CI/CD in conjunction with GitLab Runner can use Docker Engine to test and build any application.
When used with GitLab CI/CD, Docker runs each job in a separate and isolated container using the predefined image that's set up in
.gitlab-ci.yml
.
So you can use any image you need for your job to run.
- In other cases they often use the dind (Docker-in-Docker) functionality, is that necessary in my case?
3. If not, when do i use it/is it useful?
As documented in " Building Docker images with GitLab CI/CD ", this is needed if your job is to build a docker image (as opposed to use an existing docker image)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.