From bde988b001a16b74ac8b7954cf6ba7fa14feaaa9 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 17 Dec 2024 12:16:09 -0800 Subject: [PATCH] Fix docker check warnings Signed-off-by: Derek Nola --- Dockerfile.local | 16 ++++++++-------- Dockerfile.test | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Dockerfile.local b/Dockerfile.local index 2623ce64e56f..9203c445ae96 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -1,9 +1,9 @@ ARG GOLANG=golang:1.22.9-alpine3.19 -FROM ${GOLANG} as infra +FROM ${GOLANG} AS infra -ARG http_proxy=$http_proxy -ARG https_proxy=$https_proxy -ARG no_proxy=$no_proxy +ARG http_proxy +ARG https_proxy +ARG no_proxy ENV http_proxy=$http_proxy ENV https_proxy=$https_proxy ENV no_proxy=$no_proxy @@ -28,13 +28,13 @@ RUN if [ "$(go env GOARCH)" = "amd64" ]; then \ fi ARG SELINUX=true -ENV SELINUX $SELINUX -ENV STATIC_BUILD true +ENV SELINUX=$SELINUX +ENV STATIC_BUILD=true ENV SRC_DIR=/go/src/github.com/k3s-io/k3s WORKDIR ${SRC_DIR}/ -FROM infra as build +FROM infra AS build ARG SKIP_VALIDATE @@ -60,7 +60,7 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ RUN ./scripts/binary_size_check.sh -FROM scratch as result +FROM scratch AS result ENV SRC_DIR=/go/src/github.com/k3s-io/k3s COPY --from=build ${SRC_DIR}/dist /dist COPY --from=build ${SRC_DIR}/bin /bin diff --git a/Dockerfile.test b/Dockerfile.test index ab31819adf15..4b846e06ddf5 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -1,24 +1,24 @@ ARG GOLANG=golang:1.22.9-alpine3.20 -FROM ${GOLANG} as test-base +FROM ${GOLANG} AS test-base RUN apk -U --no-cache add bash jq -ENV K3S_SOURCE /go/src/github.com/k3s-io/k3s/ +ENV K3S_SOURCE=/go/src/github.com/k3s-io/k3s/ WORKDIR ${K3S_SOURCE} COPY . ${K3S_SOURCE} -FROM test-base as test-mods +FROM test-base AS test-mods COPY ./scripts/test-mods /bin/ ENTRYPOINT ["/bin/test-mods"] -FROM test-base as test-k3s +FROM test-base AS test-k3s RUN apk -U --no-cache add git gcc musl-dev docker curl coreutils python3 openssl py3-pip procps findutils yq pipx RUN PIPX_BIN_DIR=/usr/local/bin pipx install awscli -ENV SONOBUOY_VERSION 0.57.2 +ENV SONOBUOY_VERSION=0.57.2 RUN OS=linux; \ ARCH=$(go env GOARCH); \ @@ -30,7 +30,7 @@ RUN OS=linux; \ curl -fsL https://storage.googleapis.com/kubernetes-release/release/${RELEASE}/bin/linux/${ARCH}/kubectl -o /usr/local/bin/kubectl; \ chmod a+x /usr/local/bin/kubectl; -ENV TEST_CLEANUP true +ENV TEST_CLEANUP=true ENTRYPOINT ["./scripts/entry.sh"] CMD ["test"]