Skip to content

[Bug]: The HttpClient used by Testcontainer.Net does not respect DOCKER_TLS_VERIFY #1621

@prochnowc

Description

@prochnowc

Testcontainers version

4.10

Using the latest Testcontainers version?

Yes

Host OS

Linux

Host arch

x64

.NET version

10.0.2

Docker version

28.5.2

Docker info

Doesnt matter i guess.

What happened?

We are using Testcontainers in a build pipeline which runs inside a container. We use Docker In Docker container where the host only allows secure connections and has a self signed certificate.

Setting DOCKER_TLS_VERIFY: "false" works so far for the docker client, but Testcontainers gives the following error:

 System.AggregateException : One or more errors occurred. (Failed to connect to Docker endpoint at 'tcp://docker:2376/'.) (Failed to connect to Docker endpoint at 'tcp://docker:2376/'.) (Failed to connect to Docker endpoint at 'unix:///var/run/docker.sock'.) (Failed to connect to Docker endpoint at 'tcp://docker:2376/'.)
------------ DotNet.Testcontainers.Builders.DockerUnavailableException : Failed to connect to Docker endpoint at 'tcp://docker:2376/'.
---------------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
-------------------- Interop+OpenSsl+SslException : SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL.
------------------------ Interop+Crypto+OpenSslCryptographicException : error:0A000412:SSL routines::sslv3 alert bad certificate

Relevant log output

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionHave you tried our Slack Workspace (https://testcontainers.slack.com)?

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions