docker keycloak与mysql退出,代码为1

时间:2018-12-17 12:01:30

标签: mysql docker keycloak

我想使用keycloakdocker创建用户登录名。 这是我的 docker-compose.yml 文件

version: "3"
volumes:
  my-sql-data:
    driver: local
services:
  mysql:
    image: mysql:8.0.13
    volumes:
      - ./my-sql-data:/var/lib/mysql
      - ./mycustom.cnf:/etc/mysql/conf.d/custom.cnf
    ports:
      - "3307:3306"
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: keycloak
      MYSQL_USER: keycloak
      MYSQL_PASSWORD: password
  keyclok:
    image: "jboss/keycloak:4.1.0.Final"
    command:
      [
        "-b",
        "0.0.0.0",
        "-Dkeycloak.migration.action=import",
        "-Dkeycloak.migration.provider=singleFile",
        "-Dkeycloak.migration.file=/opt/jboss/keycloak/realm-config/rsm.json",
        "-Dkeycloak.migration.strategy=OVERWRITE_EXISTING",
      ]
    volumes:
      - ./realm-config:/opt/jboss/keycloak/realm-config
    ports:
      - "8080:8080"
    environment:
      DB_VENDOR: MYSQL
      DB_ADDR: mysql
      DB_DATABASE: keycloak
      DB_USER: keycloak
      DB_PASSWORD: password
      KEYCLOAK_USER: admin
      KEYCLOAK_PASSWORD: admin
      JDBC_PARAMS: "characterEncoding=UTF-8&createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true"
    depends_on:
      - mysql

这给了我这个错误

keyclok_1  | 11:49:12,280 ERROR [org.jboss.as.server] (ServerService Thread Pool -- 45) WFLYSRV0022: Deploy of deployment "keycloak-server.war" was rolled back with no failure message
keyclok_1  | docker_keyclok_1 exited with code 1

这里会是什么情况? 我已经降级了mysql版本,但是它显示了同样的错误。请帮助我....

0 个答案:

没有答案