Bind Podman ports on IPv6 to support loopback resolution#270
Bind Podman ports on IPv6 to support loopback resolution#270jonkoops wants to merge 1 commit intokeycloak:mainfrom
Conversation
Binds ports on [::] (IPv6) instead of the default 0.0.0.0 (IPv4 only) when starting the Keycloak container for tests. This ensures localhost resolves correctly regardless of whether the system prefers IPv4 or IPv6. Closes keycloak#268 Signed-off-by: Jon Koops <jonkoops@gmail.com>
3ed3fb0 to
418cc3d
Compare
There was a problem hiding this comment.
Pull request overview
Updates the Playwright integration test setup to publish the Keycloak container’s ports on IPv6 ([::]) so localhost works on systems where loopback resolution prefers IPv6 (fixing the failure described in #268).
Changes:
- Adjust Podman port publishing in Playwright’s
webServercommand to bind on IPv6 ([::]) for Keycloak. - Update the test README’s documented Podman command to match the IPv6 port binding behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/playwright.config.ts | Publishes Keycloak’s ports on IPv6 to make localhost health checks work with IPv6-preferred loopback. |
| test/README.md | Updates the documented Podman invocation to use IPv6 bindings for the same test setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fullyParallel: true, | ||
| webServer: [{ | ||
| command: `podman run -p 8080:8080 -p 9000:9000 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -e KC_HEALTH_ENABLED=true --pull=newer quay.io/keycloak/keycloak:${KEYCLOAK_VERSION} start-dev`, | ||
| command: `podman run -p [::]:8080:8080 -p [::]:9000:9000 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -e KC_HEALTH_ENABLED=true --pull=newer quay.io/keycloak/keycloak:${KEYCLOAK_VERSION} start-dev`, |
There was a problem hiding this comment.
The README examples quote the IPv6 publish arguments (e.g. -p '[::]:9000:9000'), but the Playwright webServer.command uses unquoted [::]. Quoting these -p arguments here too would keep docs/config consistent and avoids potential shell globbing issues with [] in some shells.
| command: `podman run -p [::]:8080:8080 -p [::]:9000:9000 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -e KC_HEALTH_ENABLED=true --pull=newer quay.io/keycloak/keycloak:${KEYCLOAK_VERSION} start-dev`, | |
| command: `podman run -p '[::]:8080:8080' -p '[::]:9000:9000' -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -e KC_HEALTH_ENABLED=true --pull=newer quay.io/keycloak/keycloak:${KEYCLOAK_VERSION} start-dev`, |
Binds ports on
[::](IPv6) instead of the default0.0.0.0(IPv4 only) when starting the Keycloak container for tests. This ensureslocalhostresolves correctly regardless of whether the system prefers IPv4 or IPv6.Closes #268