Я использую MySQL 5.7 и изображения Keycloak 9.0.3 docker через docker -compose. Однако Keycloak не удалось bootstrap, поскольку он не может подключиться к MySQL из-за проблем SSL.
keycloak_1 | 06:52:58,884 ERROR [stderr] (ServerService Thread Pool -- 67) Thu Apr 16 06:52:58 GMT 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Я проверил другие вопросы и добавил JBDC_PARAMS: 'useSSL=false'
в свой docker-compose.yml
, но это тоже не сработало. Вот мой docker-compose.yml
файл.
version: '3'
volumes:
mysql_data:
driver: local
services:
keycloak_mysql:
image: mysql:5.7
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: keycloak
MYSQL_USER: keycloak
MYSQL_PASSWORD: password
keycloak:
image: jboss/keycloak:9.0.3
environment:
DB_VENDOR: MYSQL
DB_ADDR: keycloak_mysql
DB_DATABASE: keycloak
DB_USER: keycloak
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: Password0!
JBDC_PARAMS: 'useSSL=false'
ports:
- 9099:8080
depends_on:
- keycloak_mysql