How to do mTLS? DOCKER_CONTEXT / DOCKER_CERT_PATH / ~/.testcontainers.properties #1469
-
Hi all, I'm running into an issue when trying to run integration tests using NUnit and Testcontainers against a remote Docker host secured with mTLS. Here's a breakdown of the situation: ✅ What works 🔧 What I’ve tried
The tests still try to connect to the local Docker daemon. The output I get is:
❓ Question Any help or pointers would be greatly appreciated! Thanks 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Testcontainers checks for container runtimes in the following order and uses the first it can connect to. If mTLS is set up correctly, it should work. These are our tests. Don't mix custom configurations. Use either env vars or the Here are a few things you should check:
Hope that helps. |
Beta Was this translation helpful? Give feedback.
Testcontainers checks for container runtimes in the following order and uses the first it can connect to. If mTLS is set up correctly, it should work. These are our tests.
Don't mix custom configurations. Use either env vars or the
.testcontainers.properties
file. Mixing makes it hard to tell what's used. Try removing the extra context and use just one custom configuration.Here are a few things you should check:
$env:DOCKER_TLS_VERIFY="
is a typo.docker.cert.path
contain the client certificates (or just the directory)?docker.tls
is overridden bydocker.tls.verify
and gets enabled automatica…