34 lines
902 B
Docker
34 lines
902 B
Docker
ARG IMG=${KEYCLOAK_IMG}
|
|
FROM ${IMG} as builder
|
|
|
|
# Enable health and metrics support
|
|
ENV KC_HEALTH_ENABLED=true
|
|
ENV KC_METRICS_ENABLED=true
|
|
ENV KC_HTTP_RELATIVE_PATH=/auth
|
|
ENV KC_PROXY=edge
|
|
# Configure a database vendor
|
|
#ENV KC_DB=postgres
|
|
|
|
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
|
|
|
|
COPY themes/dd themes/dd
|
|
|
|
RUN /opt/keycloak/bin/kc.sh build
|
|
|
|
FROM ${IMG}
|
|
COPY --from=builder /opt/keycloak/ /opt/keycloak/
|
|
|
|
|
|
# change these values to point to a running postgres instance
|
|
#ENV KC_DB_URL=<DBURL>
|
|
#ENV KC_DB_USERNAME=<DBUSERNAME>
|
|
#ENV KC_DB_PASSWORD=<DBPASSWORD>
|
|
#ENV KC_HOSTNAME=localhost
|
|
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
|
|
|
|
|
|
|
|
|