From 5cf162be2937cca4f13c02bcffc15e6266ab31dd Mon Sep 17 00:00:00 2001 From: David Kalmakoff <69595332+david-kalmakoff@users.noreply.github.com> Date: Tue, 28 May 2024 18:55:10 +0000 Subject: [PATCH] update TESTCONTAINERS_HOST_OVERRIDE documentation to TC_HOST --- docs/system_requirements/ci/dind_patterns.md | 4 ++-- docs/system_requirements/ci/gitlab_ci.md | 4 ++-- docs/system_requirements/rancher.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/system_requirements/ci/dind_patterns.md b/docs/system_requirements/ci/dind_patterns.md index 853a174d32..75fcff742c 100644 --- a/docs/system_requirements/ci/dind_patterns.md +++ b/docs/system_requirements/ci/dind_patterns.md @@ -35,9 +35,9 @@ Where: !!! warning - If you are using Docker Desktop, you need to configure the `TESTCONTAINERS_HOST_OVERRIDE` environment variable to use the special DNS name + If you are using Docker Desktop, you need to configure the `TC_HOST` environment variable to use the special DNS name `host.docker.internal` for accessing the host from within a container, which is provided by Docker Desktop: - `-e TESTCONTAINERS_HOST_OVERRIDE=host.docker.internal` + `-e TC_HOST=host.docker.internal` ### Docker Compose example diff --git a/docs/system_requirements/ci/gitlab_ci.md b/docs/system_requirements/ci/gitlab_ci.md index 6289dc59ae..a704b26ba4 100644 --- a/docs/system_requirements/ci/gitlab_ci.md +++ b/docs/system_requirements/ci/gitlab_ci.md @@ -23,13 +23,13 @@ See below for an example runner configuration: ``` !!! warning - The environment variable `TESTCONTAINERS_HOST_OVERRIDE` needs to be configured, otherwise, a wrong IP address would be used to resolve the Docker host, which will likely lead to failing tests. + The environment variable `TC_HOST` needs to be configured, otherwise, a wrong IP address would be used to resolve the Docker host, which will likely lead to failing tests. Please also include the following in your GitlabCI pipeline definitions (`.gitlab-ci.yml`) that use Testcontainers: ```yml variables: - TESTCONTAINERS_HOST_OVERRIDE: "host.docker.internal" + TC_HOST: "host.docker.internal" ``` ## Example using DinD (Docker-in-Docker) diff --git a/docs/system_requirements/rancher.md b/docs/system_requirements/rancher.md index 581b3a9cca..c8c1416000 100644 --- a/docs/system_requirements/rancher.md +++ b/docs/system_requirements/rancher.md @@ -18,7 +18,7 @@ Steps are as follows: ```sh export DOCKER_HOST=unix://$HOME/.rd/docker.sock export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock -export TESTCONTAINERS_HOST_OVERRIDE=$(rdctl shell ip a show vznat | awk '/inet / {sub("/.*",""); print $2}') +export TC_HOST=$(rdctl shell ip a show vznat | awk '/inet / {sub("/.*",""); print $2}') ``` As always, remember that environment variables are not persisted unless you add them to the relevant file for your default shell e.g. `~/.zshrc`.