Skip to content

Bind Podman ports on IPv6 to support loopback resolution#270

Open
jonkoops wants to merge 1 commit intokeycloak:mainfrom
jonkoops:bind-ipv6-ports
Open

Bind Podman ports on IPv6 to support loopback resolution#270
jonkoops wants to merge 1 commit intokeycloak:mainfrom
jonkoops:bind-ipv6-ports

Conversation

@jonkoops
Copy link
Contributor

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 #268

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>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 webServer command 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`,
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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`,

Copilot uses AI. Check for mistakes.
@jonkoops jonkoops enabled auto-merge (squash) February 17, 2026 17:15
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

Successfully merging this pull request may close these issues.

Running tests on IPv6 loopback doesn't work

1 participant