Update docker-in-docker config

This commit is contained in:
2019-05-11 22:36:53 +00:00
parent f45696dad0
commit 279f45d2cb

View File

@@ -1,16 +1,32 @@
# This file is a template, and might need editing before it works on your project. # This file is a template, and might need editing before it works on your project.
# Official docker image. # Official docker image.
image: docker:dind image: docker:latest
variables:
# When using dind service we need to instruct docker, to talk with the
# daemon started inside of the service. The daemon is available with
# a network connection instead of the default /var/run/docker.sock socket.
#
# Note that if you're using Kubernetes executor, the variable should be set to
# tcp://localhost:2375 because of how Kubernetes executor connects services
# to the job container
DOCKER_HOST: tcp://localhost:2375/
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
CONTAINER_TEST_IMAGE: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
CONTAINER_RELEASE_IMAGE: "$CI_REGISTRY_IMAGE:latest"
services:
- docker:dind
stages: stages:
- build - build
- release - release
variables:
CONTAINER_TEST_IMAGE: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
CONTAINER_RELEASE_IMAGE: "$CI_REGISTRY_IMAGE:latest"
before_script: before_script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
build: build: