Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename TC_HOST environment variable to TESTCONTAINERS_HOST_OVERRIDE #2536

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hanapedia
Copy link

What does this PR do?

Rename TC_HOST environment variable to TESTCONTAINERS_HOST_OVERRIDE to align with other testcontainers projects.

Why is it important?

The changes in this PR will align how to override the host of the docker daemon where the container port is exposed with other testcontainers projects and the current testcontainers-go documentation.

In other testcontainers projects, TESTCONTAINERS_HOST_OVERRIDE environment variable is used to override host of the docker daemon where the container port is exposed. testcontainers-go mentions this environment variable in the documentation but it is currently not implemented. Instead, testcontainers-go uses TC_HOST, which is the old envrionment variable used in other projects for the same purpose.

Related issues

Follow-ups

The changes in this PR will deprecate TC_HOST environment variable.

@hanapedia hanapedia requested a review from a team as a code owner May 8, 2024 15:03
Copy link

netlify bot commented May 8, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit de7c0d9
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/663b9458c64dec00085f93b0
😎 Deploy Preview https://deploy-preview-2536--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -3,7 +3,7 @@
_Testcontainers for Go_ supports the use of Podman (rootless or rootful) instead of Docker.

In most scenarios no special setup is required in _Testcontainers for Go_.
_Testcontainers for Go_ will automatically discover the socket based on the `DOCKER_HOST` or the `TC_HOST` environment variables.
_Testcontainers for Go_ will automatically discover the socket based on the `DOCKER_HOST` environment variables.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally remove the mention on TC_HOST did not add TESTCONTAINERS_HOST_OVERRIDE here because, from what I could tell by going through the source code for socket detection, I believe TC_HOST (or TESTCONTAINERS_HOST_OVERRIDE) environment variable was not used. tc.host in .testcontainers.properties seems to be used but not TC_HOST (or TESTCONTAINERS_HOST_OVERRIDE) environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TESTCONTAINERS_HOST_OVERRIDE is documented but not implemented
1 participant