TestcontainerEx.Connection.Ssl (testcontainer_ex v0.1.0)

Copy Markdown View Source

TLS/SSL option building for container engine connections.

Loads ca.pem, cert.pem, and key.pem from DOCKER_CERT_PATH (falling back to ~/.docker). Missing files are skipped.

Summary

Functions

Builds the :ssl_options keyword list for a TLS-secured connection.

Returns the certificate directory, respecting DOCKER_CERT_PATH. Falls back to ~/.docker when unset.

Returns the verify mode based on DOCKER_TLS_VERIFY.

Functions

build_options()

@spec build_options() :: keyword()

Builds the :ssl_options keyword list for a TLS-secured connection.

cert_dir()

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

Returns the certificate directory, respecting DOCKER_CERT_PATH. Falls back to ~/.docker when unset.

verify_mode()

@spec verify_mode() :: :verify_peer | :verify_none

Returns the verify mode based on DOCKER_TLS_VERIFY.