Verified Commit 35248950 authored by Hugo's avatar Hugo
Browse files

remove 1 stage from image

parent 3e9cf28b
Pipeline #1824 passed with stages
in 1 minute and 30 seconds
ARG VERSION
FROM quay.io/keycloak/keycloak:${VERSION} as base
FROM quay.io/keycloak/keycloak:${VERSION} as builder
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true
ENV KC_DB=postgres
RUN curl "https://lab.libreho.st/libre.sh/scim/keycloak-scim/-/jobs/artifacts/main/raw/build/libs/keycloak-scim-1.0-SNAPSHOT-all.jar?job=package" -Lo /opt/keycloak/providers/keycloak-scim-1.0-SNAPSHOT-all.jar
RUN /opt/keycloak/bin/kc.sh build
ARG VERSION
FROM quay.io/keycloak/keycloak:${VERSION} as theme
COPY --from=base /opt/keycloak/ /opt/keycloak/
COPY ./liiibre.jar /opt/keycloak/providers/liiibre.jar
RUN /opt/keycloak/bin/kc.sh build
ARG VERSION
FROM quay.io/keycloak/keycloak:${VERSION} as final
COPY --from=theme /opt/keycloak/ /opt/keycloak/
FROM quay.io/keycloak/keycloak:${VERSION}
COPY --from=builder /opt/keycloak/ /opt/keycloak/
WORKDIR /opt/keycloak
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
CMD ["start"]
......@@ -4,5 +4,7 @@ services:
keycloak:
image: libresh/keycloak:latest
build:
target: final
context: .
args:
VERSION: "18.0.0"
volumes: []
......@@ -10,12 +10,7 @@ services:
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
image: libresh/keycloak:dev
build:
context: ./
target: base
args:
VERSION: "18.0.0"
image: quay.io/keycloak/keycloak:18.0.0
volumes:
- ./src:/opt/keycloak/themes
command: start-dev --spi-theme-static-max-age=-1 --spi-theme-cache-themes=false --spi-theme-cache-templates=false
......
#!/bin/bash
sed "s|VERSION:.*\$|VERSION: \"$1\"|" -i docker-compose.yml
sed "s|quay.io/keycloak/keycloak:.*\$|quay.io/keycloak/keycloak:$1|" -i docker-compose.yml
sed "s|VERSION:.*\$|VERSION: \"$1\"|" -i docker-compose.prod.yml
sed "s|VERSION:.*\$|VERSION: \"$1\"|" -i .gitlab-ci.yml
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment