Skip to content

Commit c4f89b8

Browse files
dereknolamaxxieb
authored andcommitted
Fix docker check warnings (k3s-io#11474)
Signed-off-by: Derek Nola <[email protected]>
1 parent c659801 commit c4f89b8

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Dockerfile.local

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
ARG GOLANG=golang:1.22.9-alpine3.19
2-
FROM ${GOLANG} as infra
2+
FROM ${GOLANG} AS infra
33

4-
ARG http_proxy=$http_proxy
5-
ARG https_proxy=$https_proxy
6-
ARG no_proxy=$no_proxy
4+
ARG http_proxy
5+
ARG https_proxy
6+
ARG no_proxy
77
ENV http_proxy=$http_proxy
88
ENV https_proxy=$https_proxy
99
ENV no_proxy=$no_proxy
@@ -28,13 +28,13 @@ RUN if [ "$(go env GOARCH)" = "amd64" ]; then \
2828
fi
2929

3030
ARG SELINUX=true
31-
ENV SELINUX $SELINUX
32-
ENV STATIC_BUILD true
31+
ENV SELINUX=$SELINUX
32+
ENV STATIC_BUILD=true
3333
ENV SRC_DIR=/go/src/github.com/k3s-io/k3s
3434
WORKDIR ${SRC_DIR}/
3535

3636

37-
FROM infra as build
37+
FROM infra AS build
3838

3939
ARG SKIP_VALIDATE
4040

@@ -60,7 +60,7 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \
6060

6161
RUN ./scripts/binary_size_check.sh
6262

63-
FROM scratch as result
63+
FROM scratch AS result
6464
ENV SRC_DIR=/go/src/github.com/k3s-io/k3s
6565
COPY --from=build ${SRC_DIR}/dist /dist
6666
COPY --from=build ${SRC_DIR}/bin /bin

Dockerfile.test

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
ARG GOLANG=golang:1.22.9-alpine3.20
2-
FROM ${GOLANG} as test-base
2+
FROM ${GOLANG} AS test-base
33

44
RUN apk -U --no-cache add bash jq
5-
ENV K3S_SOURCE /go/src/github.com/k3s-io/k3s/
5+
ENV K3S_SOURCE=/go/src/github.com/k3s-io/k3s/
66
WORKDIR ${K3S_SOURCE}
77

88
COPY . ${K3S_SOURCE}
99

10-
FROM test-base as test-mods
10+
FROM test-base AS test-mods
1111

1212
COPY ./scripts/test-mods /bin/
1313
ENTRYPOINT ["/bin/test-mods"]
1414

15-
FROM test-base as test-k3s
15+
FROM test-base AS test-k3s
1616

1717
RUN apk -U --no-cache add git gcc musl-dev docker curl coreutils python3 openssl py3-pip procps findutils yq pipx
1818

1919
RUN PIPX_BIN_DIR=/usr/local/bin pipx install awscli
2020

21-
ENV SONOBUOY_VERSION 0.57.2
21+
ENV SONOBUOY_VERSION=0.57.2
2222

2323
RUN OS=linux; \
2424
ARCH=$(go env GOARCH); \
@@ -30,7 +30,7 @@ RUN OS=linux; \
3030
curl -fsL https://storage.googleapis.com/kubernetes-release/release/${RELEASE}/bin/linux/${ARCH}/kubectl -o /usr/local/bin/kubectl; \
3131
chmod a+x /usr/local/bin/kubectl;
3232

33-
ENV TEST_CLEANUP true
33+
ENV TEST_CLEANUP=true
3434

3535
ENTRYPOINT ["./scripts/entry.sh"]
3636
CMD ["test"]

0 commit comments

Comments
 (0)