From 274814b4bda446f73c2357fcd1990f8836e4554b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A5le=20Pettersen?= Date: Mon, 5 Feb 2024 13:56:56 +0100 Subject: [PATCH] Remove '--chown' from COPY instruction, as user no longer exists (#549) * Remove 'chown' The user 'gitleaks' was removed in this commit upstream: https://github.com/gitleaks/gitleaks/commit/ac4b5146b0f112df989b4374abb2b12799e37cba When building this check now, it will fail with the error: ``` unable to convert uid/gid chown string to host mapping ``` Removing this argument pointing to a user that does not exists should fix the issue. * Pin version to v8.18.2 To avoid random breakage in the future, let's pin the version of upstream version --- cmd/vulcan-gitleaks/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/vulcan-gitleaks/Dockerfile b/cmd/vulcan-gitleaks/Dockerfile index c53f39b68..a68c57920 100644 --- a/cmd/vulcan-gitleaks/Dockerfile +++ b/cmd/vulcan-gitleaks/Dockerfile @@ -1,6 +1,6 @@ # Copyright 2019 Adevinta -FROM zricethezav/gitleaks +FROM zricethezav/gitleaks:v8.18.2 # Override base label with 🔑 not supported by artifactory. LABEL org.opencontainers.image.description="Protect and discover secrets using Gitleaks" @@ -11,6 +11,6 @@ ENTRYPOINT ["/usr/bin/env"] # Install check ARG TARGETOS TARGETARCH -COPY --chown=gitleaks ${TARGETOS}/${TARGETARCH}/vulcan-gitleaks / +COPY ${TARGETOS}/${TARGETARCH}/vulcan-gitleaks / CMD ["/vulcan-gitleaks"]