TestcontainerEx.Connection.Url (testcontainer_ex v0.1.0)

Copy Markdown View Source

URL construction and TLS detection for container engine connections.

Summary

Functions

Constructs a Tesla-compatible URL from a raw container engine URL.

Returns true if the URL uses the https scheme.

Returns true if DOCKER_TLS_VERIFY is set to a truthy value.

Functions

construct(docker_host)

@spec construct(String.t()) :: String.t()

Constructs a Tesla-compatible URL from a raw container engine URL.

  • unix:///pathhttp+unix://<encoded_path>
  • tcp://host:porthttp:// or https:// (depending on TLS)
  • https:// / http:// → passed through

https?(url)

@spec https?(String.t() | any()) :: boolean()

Returns true if the URL uses the https scheme.

tls_verify?()

@spec tls_verify?() :: boolean()

Returns true if DOCKER_TLS_VERIFY is set to a truthy value.