From 33af1c1f98d8018647acf6cb3acf8696430dcf1e Mon Sep 17 00:00:00 2001 From: Achton Smidt Winther Date: Thu, 29 Jan 2026 11:09:05 +0100 Subject: [PATCH] Adjust build process and upgrade Composer to latest This adjusts the way we build the container image and run Composer during the build process. This allows us to upgrade to latest Composer version, even when the official Composer image is running in an unsupported PHP version. --- Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 52efa46..e9ac2f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ -# ----------------- -FROM composer:2.9.1@sha256:7384cf9fa70b710af02c9f40bec6e44472e07138efa5ab3428a058087c0d2724 AS build-env +FROM composer:2.9.4@sha256:1872bdb4a2080390498e75e7eb55f9d7e70c689ab5ab072a01da80720a68c6da AS composer +FROM php:8.3.7-alpine3.18@sha256:3da837b84db645187ae2f24ca664da3faee7c546f0e8d930950b12d24f0d8fa0 +COPY --from=composer /usr/bin/composer /usr/bin/composer COPY . /opt/ghsec-jira/ WORKDIR /opt/ghsec-jira RUN composer install --prefer-dist --no-dev -# ----------------- -FROM php:8.3.7-alpine3.18@sha256:3da837b84db645187ae2f24ca664da3faee7c546f0e8d930950b12d24f0d8fa0 - -COPY --from=build-env /opt/ghsec-jira/ /opt/ghsec-jira/ - ENTRYPOINT ["/opt/ghsec-jira/bin/ghsec-jira", "sync", "-vvv"]