-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile2
39 lines (29 loc) · 1.45 KB
/
Dockerfile2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ARG theme_version=0.11.1
# 1 get theme from GitHub
FROM europeana/keycloak-theme:${theme_version} AS theme
# 2 get base Keycloak image
FROM quay.io/keycloak/keycloak:20.0.5 as builder
WORKDIR /opt/keycloak
ENV KC_DB=postgres
# 3 copy addons to Quarkus providers dir
COPY addon-jars ./providers/
# 4 copy addon dependencies to Quarkus providers dir
COPY dependencies ./providers/
# 5 copy quarkus configuration with custom jdbc settings
COPY config ./conf/
# 6 copy theme
COPY --from=theme /opt/keycloak/themes/europeana ./themes/europeana
# 7 create intermediary build
RUN /opt/keycloak/bin/kc.sh build
# 8 get another copy of Keycloak image and apply changes there again
# see https://github.com/keycloak/keycloak/discussions/10502?sort=new why
FROM quay.io/keycloak/keycloak:20.0.5
WORKDIR /opt/keycloak
# 9 copy add-ons, dependencies, optimised libs and theme again to new copy
COPY --from=builder /opt/keycloak/providers/ ./providers/
COPY --from=builder /opt/keycloak/conf/ ./conf/
COPY --from=builder /opt/keycloak/lib/quarkus/ ./lib/quarkus/
COPY --from=builder /opt/keycloak/themes/europeana ./themes/europeana
# 10 start command / entry point was moved to Kustomizer deployment-patch.yaml.template
# fix for redirect issue.
CMD ["start", "--optimized", "--spi-login-protocol-openid-connect-legacy-logout-redirect-uri=true", "--hostname-strict-https=false", "--http-enabled=true", "--log='console'", "--log-console-format='%d{HH:mm:ss.SSS} %p %c:%L [%t] - %m%n>'"]