KeyCloak/Docker autoconfigure failure against MariaDB prevents starting

Hi guys,

I am trying to set up a test network of local docker images using docker-compose. I have a simple network defined using a MariaDB image writing to a host volume, a bridged network and a jboss/keycloak image:

version: “3.1”
services:
db:
image: mariadb:latest
restart: always
container_name: mariadb
environment:
MARIADB_ROOT_PASSWORD: superroot
MARIADB_DATABASE: keycloak
MARIADB_USER: keycloak
MARIADB_PASSWORD: password
networks:
- keycloak-network
ports:
- “3306”
volumes:
- data-volume:/var/lib/mysql

keycloak:
image: jboss/keycloak:13.0.1
container_name: keycloak
environment:
KEYCLOAK_USER: kuser
KEYCLOAK_PASSWORD: kpasswd
DB_VENDOR: mariadb
DB_USER: keycloak
DB_PASSWORD: password
JDBC_PARAMS: useSSL=false
JGROUPS_DISCOVERY_PROTOCOL: JDBC_PING
networks:
- keycloak-network
ports:
- 8090:8080
- 8443:8443
depends_on:
- db

networks:
keycloak-network:
driver: bridge

volumes:
data-volume:

The database container is created and starts properly.

The keycloak container, however, gets lost in the automatic configuration. It runs the database scripts to create the tables (which works, I can see in the database the tables are there). But the configuration process never returns from creating the tables and the keycloak startup times out after 5 minutes of “waiting for server stability”.

If I then try again, the process fails immediately because it tries to create tables that already exist.

Anybody got any ideas about what is happening here?

Thanks in advance,

Ben.

UPDATE 0
Hmmm, I have a suspicion regarding the cause… because it works if I use Postgres instead…