Skip to content

Introduce a TC_HOST env variable in node.js implementation of testcontainersΒ #580

@roman-dzhadan

Description

@roman-dzhadan

Intro
Python, Ruby, and Go implementations support TC_HOST env variable.
This is a logical naming convention for those who are not using Docker as their runtime containers.
Currently, Node implementation of testcontainers only supports DOCKER_HOST which is a non-logical naming convention for those who are not using Docker as their runtime containers.

@cristianrgreco, lately, I've seen you've made a lot of great improvements to make Podman & Node.js Testcontainers more compatible. What do you think about my suggestion?

Expected Behaviour
Improved API consistency of Node implementation to make the experience of usage testcontainers more language-agnostic.

Actual Behaviour
According to the documentation, I must define the DOCKER_HOST variable even if I use Podman. Which is non-logical behaviour to me.

Steps to Reproduce

  1. I'm defining a variable
export DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock
  1. I'm starting a podman.socket
systemctl --user start podman.socket
  1. I'm running my jest integration tests and everything works fine, except the fact that DOCKER_HOST env var doesn't represent the reality of my usage of Podman.

Environment Information

  • Operating System: WSL2 distro (Ubuntu 22.04.2 LTS) within the Windows 11 Pro (22621.1778)
  • Docker Version: Irrelevant
  • Podman Version: 4.5.1
  • Node version: v18.16.0
  • Testcontainers version: 9.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions