Skip to content

Commit

Permalink
Add information for TLS disabled mode in Gitlab (#2466)
Browse files Browse the repository at this point in the history
The Docker daemon supports connection over TLS and it’s done by default for Docker 19.03.1 or higher.
We need to instruct docker to not start over TLS with DOCKER_TLS_CERTDIR variable

Co-authored-by: Richard North <rich.north@gmail.com>
  • Loading branch information
pmihalcin and rnorth committed Apr 7, 2021
1 parent bc48eeb commit b3cf062
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GitLab CI

In order to use Testcontainers in a Gitlab CI pipeline, you need to run the job as a Docker container (see [Patterns for running inside Docker](dind_patterns.md)).
So edit your `.gitlab-ci.yml` to include the [Docker-In-Docker service](https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-executor) (`docker:dind`) and set the `DOCKER_HOST` variable to `tcp://docker:2375`.
So edit your `.gitlab-ci.yml` to include the [Docker-In-Docker service](https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-workflow-with-docker-executor) (`docker:dind`) and set the `DOCKER_HOST` variable to `tcp://docker:2375` and `DOCKER_TLS_CERTDIR` to empty string.

Here is a sample `.gitlab-ci.yml` that executes test with gradle:

Expand All @@ -13,6 +13,8 @@ services:
variables:
# Instruct Testcontainers to use the daemon of DinD.
DOCKER_HOST: "tcp://docker:2375"
# Instruct Docker not to start over TLS.
DOCKER_TLS_CERTDIR: ""
# Improve performance with overlayfs.
DOCKER_DRIVER: overlay2

Expand Down

0 comments on commit b3cf062

Please sign in to comment.