Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid certificate when communicating from another Docker container #71

Open
nicob21 opened this issue Nov 29, 2024 · 1 comment
Open

Comments

@nicob21
Copy link

nicob21 commented Nov 29, 2024

Context:
I have localsandbox running in a container and I use it to run my app unit tests.
When run my tests locally targeting the localsandbox container with localhost.localsandbox.sh:<PORT> it works fine.

Now I want to be able to run my tests inside a Docker container so they can run in CI.
I setup my docker-compose to run a localsandbox container and another with my app and run the unit tests.
Both containers are on the same Docker network.

I replaced localhost.localsandbox.sh:<PORT> by <container-name>:<PORT> in the endpoint and connection string and I get the following certificate error:

error: Hostname/IP does not match certificate's altnames: Host: service-bus. is not in the cert's altnames: DNS:localhost.localsandbox.dev, DNS:localhost.localsandbox.io, DNS:localhost.localsandbox.sh {
  "name": "RestError",
  "code": "ERR_TLS_CERT_ALTNAME_INVALID",
  "stack": "RestError: Hostname/IP does not match certificate's altnames: Host: service-bus. is not in the cert's altnames: DNS:localhost.localsandbox.dev, DNS:localhost.localsandbox.io, DNS:localhost.localsandbox.sh

Is there anything I can do to make it work? Thanks

Copy link

linear bot commented Nov 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant