Skip to content

Commit 3bfe4ef

Browse files
authored
Merge pull request #7078 from chrischdi/pr-fix-dockerfile-lint
🐛 add lint-dockerfiles to verify and fix hadolint finding
2 parents 30942bf + 2e71ba7 commit 3bfe4ef

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
6363
-o manager ${package}
6464

6565
# Production image
66-
FROM --platform=${ARCH} gcr.io/distroless/static:nonroot
66+
FROM gcr.io/distroless/static:nonroot-${ARCH}
6767
WORKDIR /
6868
COPY --from=builder /workspace/manager .
6969
# Use uid of nonroot user (65532) because kubernetes expects numeric user when applying pod security policies

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ apidiff: $(GO_APIDIFF) ## Check for API differences
472472
ALL_VERIFY_CHECKS = doctoc boilerplate shellcheck tiltfile modules gen conversions capi-book-summary
473473

474474
.PHONY: verify
475-
verify: $(addprefix verify-,$(ALL_VERIFY_CHECKS)) ## Run all verify-* targets
475+
verify: $(addprefix verify-,$(ALL_VERIFY_CHECKS)) lint-dockerfiles ## Run all verify-* targets
476476

477477
.PHONY: verify-modules
478478
verify-modules: generate-modules ## Verify go modules are up to date

cmd/clusterctl/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
6363
-o clusterctl ${package}
6464

6565
# Production image
66-
FROM --platform=${ARCH} gcr.io/distroless/static:nonroot
66+
FROM gcr.io/distroless/static:nonroot-${ARCH}
6767
WORKDIR /
6868
COPY --from=builder /workspace/clusterctl .
6969
# Use uid of nonroot user (65532) because kubernetes expects numeric user when applying pod security policies

test/extension/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
6666
-o /workspace/extension ${package}
6767

6868
# Production image
69-
FROM --platform=${ARCH} gcr.io/distroless/static:nonroot
69+
FROM gcr.io/distroless/static:nonroot-${ARCH}
7070
WORKDIR /
7171
COPY --from=builder /workspace/extension .
7272
# Use uid of nonroot user (65532) because kubernetes expects numeric user when applying pod security policies

test/infrastructure/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
7373
# Ignore Hadolint rule "Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag."
7474
# https://github.com/hadolint/hadolint/wiki/DL3007
7575
# hadolint ignore=DL3007
76-
FROM --platform=${ARCH} gcr.io/distroless/static:latest
76+
FROM gcr.io/distroless/static:latest-${ARCH}
7777

7878
WORKDIR /
7979
COPY --from=builder /workspace/manager .

0 commit comments

Comments
 (0)