Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARG TARGETARCH
WORKDIR /build

# Copy just the mod file for better layer caching when building locally
COPY go.mod go.sum .
COPY go.mod go.sum ./
RUN go mod download

# Now copy everything including .git
Expand All @@ -48,11 +48,11 @@ COPY --from=build /build/cosign_version.txt /download/

# Download the matching version of cosign
RUN COSIGN_VERSION=$(cat /download/cosign_version.txt) && \
curl -sLO https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign-${TARGETOS}-${TARGETARCH} && \
curl -sLO https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign_checksums.txt && \
sha256sum --check <(grep -w "cosign-${TARGETOS}-${TARGETARCH}" < cosign_checksums.txt) && \
mv "cosign-${TARGETOS}-${TARGETARCH}" cosign && \
chmod +x cosign
curl -sLO https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign-${TARGETOS}-${TARGETARCH} && \
curl -sLO https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign_checksums.txt && \
sha256sum --check <(grep -w "cosign-${TARGETOS}-${TARGETARCH}" < cosign_checksums.txt) && \
mv "cosign-${TARGETOS}-${TARGETARCH}" cosign && \
chmod +x cosign

FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4@sha256:2636170dc55a0931d013014a72ae26c0c2521d4b61a28354b3e2e5369fa335a3

Expand Down
12 changes: 6 additions & 6 deletions Dockerfile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ USER root
WORKDIR /build

# Copy just the mod file for better layer caching when building locally
COPY go.mod go.sum .
COPY go.mod go.sum ./
RUN go mod download

# Now copy everything including .git
Expand All @@ -56,11 +56,11 @@ COPY --from=build /build/cosign_version.txt /download/

# Download the matching version of cosign
RUN COSIGN_VERSION=$(cat /download/cosign_version.txt) && \
curl -sLO https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign-${TARGETOS}-${TARGETARCH} && \
curl -sLO https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign_checksums.txt && \
sha256sum --check <(grep -w "cosign-${TARGETOS}-${TARGETARCH}" < cosign_checksums.txt) && \
mv "cosign-${TARGETOS}-${TARGETARCH}" cosign && \
chmod +x cosign
curl -sLO https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign-${TARGETOS}-${TARGETARCH} && \
curl -sLO https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign_checksums.txt && \
sha256sum --check <(grep -w "cosign-${TARGETOS}-${TARGETARCH}" < cosign_checksums.txt) && \
mv "cosign-${TARGETOS}-${TARGETARCH}" cosign && \
chmod +x cosign

## Final image

Expand Down