Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

Keycloak MySQL

Extends the Keycloak docker image to use MySQL


Start a MySQL instance

First start a MySQL instance using the MySQL docker image:

docker run --name mysql -e MYSQL_DATABASE=keycloak -e MYSQL_USER=keycloak -e MYSQL_PASSWORD=password -e MYSQL_ROOT_PASSWORD=root_password -d mysql

Start a Keycloak instance

Start a Keycloak instance and connect to the MySQL instance:

docker run --name keycloak --link mysql:mysql jboss/keycloak-mysql

Environment variables

When starting the Keycloak instance you can pass a number of environment variables to configure how it connects to MySQL. For example:

docker run --name keycloak --link mysql:mysql -e MYSQL_DATABASE=kcdb -e MYSQL_USER=kcuser -e MYSQL_PASSWORD=kcpassword jboss/keycloak-mysql


Specify name of MySQL database (optional, default is keycloak).


Specify user for MySQL database (optional, default is keycloak).


Specify password for MySQL database (optional, default is keycloak).

Docker Pull Command
Source Repository