kdocs
GitHub
T&O - Authentication
T&O - Authentication
  • Protocols
    • OAuth 2.0
    • OpenID Connect
  • Tools
    • Keycloack
      • With Docker
Powered by GitBook
On this page
  • Running Keycloak
  • Simple Dev Container
  • Optimized Production Container
  1. Tools
  2. Keycloack

With Docker

PreviousKeycloack

Last updated 3 months ago

Running Keycloak with Docker. The official image is not in Docker Images website, but in this one bellow:

By default, the server is listening for http and https requests using the ports 8080 and 8443, respectively.

The Dabase used is not created/maintained by Keycloak, it must be created and informed to Keycloack.

Simple Dev Container

With a Docker Compose configuration:

compose.yaml
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
compose.yaml
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 more options running with containers .

Initial of Keycloak.

Check the for more info on configuring for production environments.

Running Keycloak
here
configuration
Guides
Quay
Keycloak Docker Image
Guides - Keycloak
Guides for integrations
Logo
Logo