From 4f1707d61283fc947f89e2bc12e5c2ff3ddffcc7 Mon Sep 17 00:00:00 2001 From: royalcat Date: Tue, 30 Jul 2024 11:32:12 +0300 Subject: [PATCH] build refactor --- .forgejo/workflows/image.yaml | 11 ++--------- Dockerfile | 16 +++++----------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/.forgejo/workflows/image.yaml b/.forgejo/workflows/image.yaml index ff2bff6..3967d24 100644 --- a/.forgejo/workflows/image.yaml +++ b/.forgejo/workflows/image.yaml @@ -10,13 +10,6 @@ jobs: permissions: contents: read packages: write - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/arm64 - runs-on: ubuntu-latest steps: - name: Set up Docker Buildx @@ -51,12 +44,12 @@ jobs: type=sha - name: Build and push Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . push: true pull: true - platforms: ${{ matrix.platform }} + platforms: linux/amd64,linux/arm64 labels: ${{ steps.meta.outputs.labels }} sbom: true provenance: true diff --git a/Dockerfile b/Dockerfile index 7762c01..e4a5c61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,10 +21,13 @@ ENV KC_FEATURES=docker ENV KC_FEATURES_DISABLED=kerberos,ciba,fips ENV KC_CACHE=local ENV KC_PROXY=edge +ENV KC_FEATURES=docker,hostname:v2 +ENV KC_HTTP_ENABLED=true +ENV KC_PROXY_HEADERS=xforwarded # ADD --chown=keycloak:keycloak --chmod=644 \ -# https://github.com/wadahiro/keycloak-discord/releases/download/v0.5.0/keycloak-discord-0.5.0.jar \ -# /opt/keycloak/providers/discord.jar + # https://github.com/wadahiro/keycloak-discord/releases/download/v0.5.0/keycloak-discord-0.5.0.jar \ + # /opt/keycloak/providers/discord.jar COPY --from=discord_builder --chown=keycloak:keycloak --chmod=644 \ /keycloak-discord/target/keycloak-discord-0.5.1-SNAPSHOT.jar \ /opt/keycloak/providers/discord.jar @@ -35,13 +38,4 @@ RUN /opt/keycloak/bin/kc.sh build FROM quay.io/keycloak/keycloak:${KC_VERSION} COPY --from=builder /opt/keycloak/ /opt/keycloak/ -ENV KC_HEALTH_ENABLED=true -ENV KC_METRICS_ENABLED=true -ENV KC_DB=postgres -ENV KC_FEATURES=docker,hostname:v2 -ENV KC_FEATURES_DISABLED=kerberos,ciba,fips -ENV KC_CACHE=local -ENV KC_HTTP_ENABLED=true -ENV KC_PROXY_HEADERS=xforwarded - ENTRYPOINT ["/opt/keycloak/bin/kc.sh"] \ No newline at end of file