With Docker
Running Keycloak
with Docker. The official image is not in Docker Images website, but in this one bellow:
Check more options running with containers here.
Initial configuration of Keycloak.
Simple Dev Container
With a Docker Compose configuration:
services:
keycloack:
image: quay.io/keycloak/keycloak:latest
command: start-dev
ports:
- 8080:8080
environment:
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
services:
keycloak-postgres:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
image: quay.io/keycloak/keycloak:latest
environment:
DB_VENDOR: POSTGRES
DB_ADDR: keycloak-postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: password
ports:
- "8080:8080"
depends_on:
- keycloak-postgres
Optimized Production Container
By default, when you use the start
or start-dev
command, Keycloak runs a build
command under the covers for convenience reasons.
Check the Guides for more info on configuring for production environments.
Last updated