Skip to content
Snippets Groups Projects
Commit 9866e75d authored by Giovanni Guerrieri's avatar Giovanni Guerrieri
Browse files

Update .gitlab-ci.yml

parent 8130ca8f
No related branches found
No related tags found
No related merge requests found
Pipeline #2980553 passed
......@@ -3,7 +3,7 @@
# If you want to use DinD for your Docker-build jobs, you can use our privileged shared
# GitLab-runners. This allows to directly build the image yourself as per https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-workflow-with-docker-executor
build docker image conda scipy with dind:
build docker image with dind:
stage: build
tags:
- docker-privileged
......@@ -37,51 +37,5 @@ build docker image conda scipy with dind:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE" ./ROOT_conda_built_scipy
- docker push "$CI_REGISTRY_IMAGE"
build docker image conda base with dind:
stage: build
tags:
- docker-privileged
# Use specific version of the official docker client image (as well as the docker-in-docker image) as recommended by
# https://about.gitlab.com/2019/07/31/docker-in-docker-with-docker-19-dot-03/
image: docker:19.03.1
services:
# To obtain a Docker daemon, request a Docker-in-Docker service
- docker:19.03.1-dind
# Note about internal IPs Clash
# If the internal private network assigned to the dind service clashes with any service/host used on the job,
# you can specify a different IP subnet to avoid the clash. Useful command to inspect the assigned IP range
# is `docker network inspect bridge`.
# To effectively assign a different IP subnet, replace the previous service definition with the following:
# services:
# # To obtain a Docker daemon, request a Docker-in-Docker service
# - name: docker:19.03.1-dind
# # Add to the dockerd command a specific bridge Ip, in this case the range 10.200.0.1/24 (to be adapted)
# command: ["--bip=10.200.0.1/24"]
variables:
# As of GitLab 12.5, privileged runners at CERN mount a /certs/client docker volume that enables use of TLS to
# communicate with the docker daemon. This avoids a warning about the docker service possibly not starting
# successfully.
# See https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
DOCKER_TLS_CERTDIR: "/certs"
# Note that we do not need to set DOCKER_HOST when using the official docker client image: it automatically
# defaults to tcp://docker:2376 upon seeing the TLS certificate directory.
#DOCKER_HOST: tcp://docker:2376/
script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE":conda ./ROOT_conda_minimal
- docker push "$CI_REGISTRY_IMAGE":conda
# Features
# * Allows your job to have access to the host, as it runs in privileged mode
# * Allows to use docker-build directly
# Limitations
# * Privileged runners take around 1-2 minutes to spawn a VM for your job and do not cache Docker-images
# * These runners will not be available during Openstack Nova API downtime
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment