20 lines
692 B
Bash
Executable File
20 lines
692 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function error_handler() {
|
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
|
exit "$2"
|
|
}
|
|
trap 'error_handler ${LINENO} $?' ERR
|
|
set -o errtrace -o errexit -o nounset -o pipefail
|
|
|
|
docker run -p 8080:8080 -d --rm --name keycloak -e KEYCLOAK_LOGLEVEL=ALL -e ROOT_LOGLEVEL=ALL -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:18.0.0 start-dev
|
|
|
|
# to export:
|
|
# /opt/keycloak/bin/kc.sh export --dir /tmp/hey --users realm_file
|
|
|
|
# NOTE: creds - user1 / password
|
|
|
|
docker cp bin/finance-realm.json keycloak:/tmp
|
|
docker exec keycloak /opt/keycloak/bin/kc.sh import --file /tmp/finance-realm.json
|
|
docker logs -f keycloak
|