-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added optmized custom keycloak docker file and Course PDF file
- Loading branch information
1 parent
57ccbac
commit 2da4938
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM quay.io/keycloak/keycloak:latest as builder | ||
|
||
ENV KC_HEALTH_ENABLED=true | ||
ENV KC_METRICS_ENABLED=true | ||
ENV KC_FEATURES=token-exchange | ||
ENV KC_DB=mysql | ||
# Install custom providers | ||
RUN curl -sL https://github.com/aerogear/keycloak-metrics-spi/releases/download/2.5.3/keycloak-metrics-spi-2.5.3.jar -o /opt/keycloak/providers/keycloak-metrics-spi-2.5.3.jar | ||
|
||
RUN /opt/keycloak/bin/kc.sh build | ||
|
||
FROM quay.io/keycloak/keycloak:latest | ||
COPY --from=builder /opt/keycloak/ /opt/keycloak/ | ||
WORKDIR /opt/keycloak | ||
# for demonstration purposes only, please make sure to use proper certificates in production instead | ||
RUN keytool -genkeypair -storepass password -storetype PKCS12 -keyalg RSA -keysize 2048 -dname "CN=server" -alias server -ext "SAN:c=DNS:localhost,IP:127.0.0.1" -keystore conf/server.keystore | ||
# change these values to point to a running postgres instance | ||
ENV KC_DB_URL=jdbc:mysql://mysql:3306/keycloak | ||
ENV KC_DB_USERNAME=keycloak | ||
ENV KC_DB_PASSWORD=password | ||
ENV KC_HOSTNAME=localhost | ||
ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start"] |
Binary file not shown.