I want to run keycloak container with below docker compose file.
version: '2.1'
services:
# keycloak
keycloak:
container_name: keycloak
image: jboss/keycloak:latest
restart: always
ports:
- 8080:8080
volumes:
- C:\logs\keycloak:/usr/app/logs
- C:\settings:/etc/settings
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- KEYCLOAK_IMPORT=/etc/settings/realm.json
Everything except realm import works fine in this case. This is shortcut of the error thrown during container run:
Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher) Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /etc/settings/realm.json (Is a directory) Caused by: java.io.FileNotFoundException: /etc/settings/realm.json (Is a directory)"}`
I am sure the file exists in this location.
I have checked several different configurations for import e.g. specyfing imported file: C:\settings\realm.json:/etc/settings/realm.json
but the result is the same.
Have you got any ideas how the proper configuration should look like?