Repository navigation
Replies: 1 comment
|
I was able to use a custom image with this Dockerfile: FROM quay.io/keycloak/keycloak:latest as builder
# Enable health and metrics support
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true
# Configure a database vendor
ENV KC_DB=postgres
WORKDIR /opt/keycloak
# custom cache
ENV KC_CACHE_CONFIG_FILE=my-cache-ispn.xml
ADD config/my-cache-ispn.xml conf/my-cache-ispn.xml
# 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
RUN /opt/keycloak/bin/kc.sh build
FROM quay.io/keycloak/keycloak:latest
COPY --from=builder /opt/keycloak/ /opt/keycloak/
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]After building/tagging this image, I just have to add Hope this help |
8000
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I guess I'm missing the boat a little here on why using a custom image causes things to fail. From quay.io/keycloak/keycloak:20.0.3, I added in some custom CA certs to the java cacerts keystore... and when I try to use the image... the operator is totally ignoring my selected DB vendor ... even if I hard-code KC_DB ... when the pod runs... it's trying to use the h2 driver... which makes no sense...
What might I be missing here?
All reactions