10073 reduced quarkus image size (#10074)

This commit is contained in:
Sebastian Schuster 2022-02-10 08:01:51 +01:00 committed by GitHub
parent 23e5bc7aa3
commit 011d108fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,16 +15,16 @@ RUN (cd /tmp/keycloak && \
RUN mv /tmp/keycloak/keycloak-* /opt/keycloak
RUN chmod -R g+rwX /opt/keycloak
FROM registry.access.redhat.com/ubi8-minimal
COPY --from=build-env /opt/keycloak /opt/keycloak
COPY --from=build-env --chown=1000:0 /opt/keycloak /opt/keycloak
RUN microdnf update -y && \
microdnf install -y java-11-openjdk-headless && microdnf clean all && rm -rf /var/cache/yum/* && \
echo "keycloak:x:0:root" >> /etc/group && \
echo "keycloak:x:1000:0:keycloak user:/opt/keycloak:/sbin/nologin" >> /etc/passwd && \
chown -R keycloak:root /opt/keycloak && \
chmod -R g+rwX /opt/keycloak
echo "keycloak:x:1000:0:keycloak user:/opt/keycloak:/sbin/nologin" >> /etc/passwd
USER 1000