Skip to content

Commit 5c7014a

Browse files
mridangclaude
andcommitted
fix: resolve host.docker.internal DNS failure on Linux CI and suppress GitGuardian false positives
Add --add-host=host.docker.internal:host-gateway to the runtime container via withExtraHost() so that host.docker.internal resolves on GitHub Actions Ubuntu runners (Docker Desktop injects this automatically on macOS/Windows but not on Linux). Add .gitguardian.yaml to ignore the self-signed test TLS certificates in src/spec/resources/generated/*/certs/ — these are intentionally committed mock-server certs with no real-world trust or access. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7242b89 commit 5c7014a

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.gitguardian.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
# Test TLS certificates committed intentionally for integration test use.
3+
# These are self-signed certs generated for WireMock/Prism mock servers and
4+
# carry no real-world trust or access. They are not production secrets.
5+
ignore-paths:
6+
- src/spec/resources/generated/*/certs/

src/spec/java/io/github/mridang/codegen/spec/AbstractIntegrationSpec.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ protected ExecResult executeInRuntimeContainer(String[] commands) {
6666
.withFileSystemBind(
6767
tempOutputDir.toAbsolutePath().toString(), "/app", BindMode.READ_WRITE)
6868
.withFileSystemBind("/var/run/docker.sock", "/var/run/docker.sock", BindMode.READ_WRITE)
69+
.withExtraHost("host.docker.internal", "host-gateway")
6970
.withEnv("TESTCONTAINERS_HOST_OVERRIDE", "host.docker.internal")
7071
.withEnv("TC_HOST", "host.docker.internal")
7172
.withEnv("DOCKER_HOST", "unix:///var/run/docker.sock")

0 commit comments

Comments
 (0)