I run keycloak standalone using a command for docker docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin quay.io/keycloak/keycloak:15.0.2
How to mount a volume to save the data, after container is stopped?
working docker-compose.yml
volumes:
keycloak:
services:
keycloak:
image: quay.io/keycloak/keycloak:26.1.4
ports:
- 8080:8080
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
volumes:
- keycloak:/opt/keycloak/data/
restart: always
command:
- "start-dev"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With