Running Keycloak using Docker
Container-based deployment provides the quickest way to enable and start using Keycloak. Keycloak supports Docker, Podman, and Kubernetes as containers:
- To run Keycloak in development mode using Docker, execute the following command:
docker run -p 8081:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin
quay.io/keycloak/keycloak:19.0.3 start-dev
:
Figure 9.1 – Starting Keycloak using Docker
The developer mode Docker image of Keycloak runs on port 8080
. In the preceding command, the -p 8081:8080
parameter exposes port 8081
on the local machine to port 8080
on the Keycloak server. The preceding command also initializes the administrator username and password as admin
.
When the … Listening on: http://0.0.0.0:8080
message is displayed, Keycloak is ready for use:
Figure 9.2 – Running Keycloak
With Keycloak ready and operational, we are ready to start using...