How To Create a Docker Image during GitLab Pipeline
k8s August 20, 2020Use:
- image
docker:dind
- selector:
tags: - kubernetes
- docker daemon detached
dockerd &
Example:
create_docker_image:
image: docker:dind
stage: build
script:
- dockerd &
- sleep 5
- docker build -t <registry>/docs:1.0.0 --no-cache .
only:
- master
tags:
- kubernetes