From 1364fa4d388312ad616b996ab691aa2e9fd90a8b Mon Sep 17 00:00:00 2001 From: Lance Ball Date: Thu, 26 Oct 2023 09:26:59 -0400 Subject: [PATCH] :open_file_folder: update Red Hat specific files --- Dockerfile | 14 +++++++++++--- redhat/overlays/Dockerfile | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20b4e58d52a..2c5567def58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,10 @@ WORKDIR /cosign COPY . . USER root RUN git config --global --add safe.directory /cosign -RUN make cosign +RUN make cross +RUN gzip cosign-darwin-amd64 +RUN gzip cosign-linux-amd64 +RUN gzip cosign-windows-amd64 # Install Cosign FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:b40f52aa68b29634ff45429ee804afbaa61b33de29ae775568933c71610f07a4 @@ -17,8 +20,13 @@ LABEL io.openshift.tags="cosign trusted-signer" LABEL summary="Provides the cosign CLI binary for signing and verifying container images." LABEL com.redhat.component="cosign" -COPY --from=build-env /cosign/cosign /usr/local/bin/cosign -RUN chown root:0 /usr/local/bin/cosign && chmod g+wx /usr/local/bin/cosign +COPY --from=build-env /cosign/cosign-darwin-amd64.gz /usr/local/bin/cosign-darwin-amd64.gz +COPY --from=build-env /cosign/cosign-linux-amd64.gz /usr/local/bin/cosign-linux-amd64.gz +COPY --from=build-env /cosign/cosign-windows-amd64.gz /usr/local/bin/cosign-windows-amd64.gz + +RUN chown root:0 /usr/local/bin/cosign-darwin-amd64.gz && chmod g+wx /usr/local/bin/cosign-darwin-amd64.gz +RUN chown root:0 /usr/local/bin/cosign-linux-amd64.gz && chmod g+wx /usr/local/bin/cosign-linux-amd64.gz +RUN chown root:0 /usr/local/bin/cosign-windows-amd64.gz && chmod g+wx /usr/local/bin/cosign-windows-amd64.gz #Configure home directory ENV HOME=/home diff --git a/redhat/overlays/Dockerfile b/redhat/overlays/Dockerfile index 20b4e58d52a..2c5567def58 100644 --- a/redhat/overlays/Dockerfile +++ b/redhat/overlays/Dockerfile @@ -5,7 +5,10 @@ WORKDIR /cosign COPY . . USER root RUN git config --global --add safe.directory /cosign -RUN make cosign +RUN make cross +RUN gzip cosign-darwin-amd64 +RUN gzip cosign-linux-amd64 +RUN gzip cosign-windows-amd64 # Install Cosign FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:b40f52aa68b29634ff45429ee804afbaa61b33de29ae775568933c71610f07a4 @@ -17,8 +20,13 @@ LABEL io.openshift.tags="cosign trusted-signer" LABEL summary="Provides the cosign CLI binary for signing and verifying container images." LABEL com.redhat.component="cosign" -COPY --from=build-env /cosign/cosign /usr/local/bin/cosign -RUN chown root:0 /usr/local/bin/cosign && chmod g+wx /usr/local/bin/cosign +COPY --from=build-env /cosign/cosign-darwin-amd64.gz /usr/local/bin/cosign-darwin-amd64.gz +COPY --from=build-env /cosign/cosign-linux-amd64.gz /usr/local/bin/cosign-linux-amd64.gz +COPY --from=build-env /cosign/cosign-windows-amd64.gz /usr/local/bin/cosign-windows-amd64.gz + +RUN chown root:0 /usr/local/bin/cosign-darwin-amd64.gz && chmod g+wx /usr/local/bin/cosign-darwin-amd64.gz +RUN chown root:0 /usr/local/bin/cosign-linux-amd64.gz && chmod g+wx /usr/local/bin/cosign-linux-amd64.gz +RUN chown root:0 /usr/local/bin/cosign-windows-amd64.gz && chmod g+wx /usr/local/bin/cosign-windows-amd64.gz #Configure home directory ENV HOME=/home