Skip to content

Commit b3cf062

Browse files
pmihalcinrnorth
andauthored
Add information for TLS disabled mode in Gitlab (#2466)
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 <[email protected]>
1 parent bc48eeb commit b3cf062

File tree

1 file changed

+3
-1
lines changed
  • docs/supported_docker_environment/continuous_integration

1 file changed

+3
-1
lines changed

docs/supported_docker_environment/continuous_integration/gitlab_ci.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GitLab CI
22

33
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)).
4-
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`.
4+
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.
55

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

@@ -13,6 +13,8 @@ services:
1313
variables:
1414
# Instruct Testcontainers to use the daemon of DinD.
1515
DOCKER_HOST: "tcp://docker:2375"
16+
# Instruct Docker not to start over TLS.
17+
DOCKER_TLS_CERTDIR: ""
1618
# Improve performance with overlayfs.
1719
DOCKER_DRIVER: overlay2
1820

0 commit comments

Comments
 (0)