How to run Docker in Docker with Gitlab CI/CD
Here is the sample how to use in Gitlab pipelines docker-cli
Additional info on services could be found in official documentation https://docs.gitlab.com/ci/services/
stages:
- test_dind
test_dind:
when: "manual"
image: docker:latest # The image for the job's main container (contains the Docker CLI)
services:
- docker:dind
stage: test_dind
variables:
DOCKER_HOST: tcp://docker:2375
script: |
docker run --rm python:latest python --version
echo FINISHED