Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions testcontainers/src/core/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,13 @@ impl Client {
}

pub(crate) async fn docker_hostname(&self) -> Result<url::Host, ClientError> {
// allow TESTCONTAINERS_HOST_OVERRIDE to override the docker host
if let Some(host_override) =
<env::Os as env::GetEnvValue>::get_env_value("TESTCONTAINERS_HOST_OVERRIDE")
{
return url::Host::parse(&host_override)
.map_err(|_| ConfigurationError::InvalidDockerHost(host_override).into());
}
let docker_host = &self.config.docker_host();
let docker_host_url = Url::from_str(docker_host)
.map_err(|e| ConfigurationError::InvalidDockerHost(e.to_string()))?;
Expand Down