Skip to content

Commit 150e55d

Browse files
authored
Merge pull request #1657 from simonbaird/small-dockerfile-delint
Some minor Dockerfile delinting
2 parents 14e6d43 + 459b2f0 commit 150e55d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ARG TARGETARCH
2424
WORKDIR /build
2525

2626
# Copy just the mod file for better layer caching when building locally
27-
COPY go.mod go.sum .
27+
COPY go.mod go.sum ./
2828
RUN go mod download
2929

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

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

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

Dockerfile.dist

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ USER root
3232
WORKDIR /build
3333

3434
# Copy just the mod file for better layer caching when building locally
35-
COPY go.mod go.sum .
35+
COPY go.mod go.sum ./
3636
RUN go mod download
3737

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

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

6565
## Final image
6666

0 commit comments

Comments
 (0)