From e7b79938237cc2daa10447243fa7d96289e097bb Mon Sep 17 00:00:00 2001 From: "Zhu, Ling Dr (Elec Electronic Eng)" <l.zhu@surrey.ac.uk> Date: Mon, 1 Feb 2021 23:44:50 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6196cb8..cd9c50d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,13 +2,26 @@ stages: - publish variables: - DOCKER_HOST: tcp://localhost:2375/ - DOCKER_DRIVER: overlay2 - DOCKER_TLS_CERTDIR: "" CONTAINER_IMAGE: gitlab-registry.eps.surrey.ac.uk/lz0002/hello build: - image: docker:latest + image: + name: docker:stable + # This will run a Docker daemon in a container (Docker-In-Docker), which will + # be available at thedockerhost:2375. If you make e.g. port 5000 public in Docker + # (`docker run -p 5000:5000 yourimage`) it will be exposed at thedockerhost:5000. + services: + - name: docker:dind + alias: thedockerhost + + variables: + # Tell docker CLI how to talk to Docker daemon; see + # https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-executor + DOCKER_HOST: tcp://thedockerhost:2375/ + # Use the overlayfs driver for improved performance: + DOCKER_DRIVER: overlay2 + DOCKER_TLS_CERTDIR: "" + stage: publish tags: - deployment -- GitLab