Fix docker check warnings (#11474)

Signed-off-by: Derek Nola <derek.nola@suse.com>
pull/11598/head
Derek Nola 2024-12-18 11:23:30 -08:00
parent 958f20f0a5
commit fba3ad6fb1
2 changed files with 15 additions and 15 deletions

View File

@ -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

View File

@ -1,24 +1,24 @@
ARG GOLANG=golang:1.22.9-alpine3.19
FROM ${GOLANG} as test-base
ARG GOLANG=golang:1.22.9-alpine3.20
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.1
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"]