Commit fba3ad6f authored by Derek Nola's avatar Derek Nola

Fix docker check warnings (#11474)

parent 958f20f0
ARG GOLANG=golang:1.22.9-alpine3.19 ARG GOLANG=golang:1.22.9-alpine3.19
FROM ${GOLANG} as infra FROM ${GOLANG} AS infra
ARG http_proxy=$http_proxy ARG http_proxy
ARG https_proxy=$https_proxy ARG https_proxy
ARG no_proxy=$no_proxy ARG no_proxy
ENV http_proxy=$http_proxy ENV http_proxy=$http_proxy
ENV https_proxy=$https_proxy ENV https_proxy=$https_proxy
ENV no_proxy=$no_proxy ENV no_proxy=$no_proxy
...@@ -28,13 +28,13 @@ RUN if [ "$(go env GOARCH)" = "amd64" ]; then \ ...@@ -28,13 +28,13 @@ RUN if [ "$(go env GOARCH)" = "amd64" ]; then \
fi fi
ARG SELINUX=true ARG SELINUX=true
ENV SELINUX $SELINUX ENV SELINUX=$SELINUX
ENV STATIC_BUILD true ENV STATIC_BUILD=true
ENV SRC_DIR=/go/src/github.com/k3s-io/k3s ENV SRC_DIR=/go/src/github.com/k3s-io/k3s
WORKDIR ${SRC_DIR}/ WORKDIR ${SRC_DIR}/
FROM infra as build FROM infra AS build
ARG SKIP_VALIDATE ARG SKIP_VALIDATE
...@@ -60,7 +60,7 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ ...@@ -60,7 +60,7 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \
RUN ./scripts/binary_size_check.sh RUN ./scripts/binary_size_check.sh
FROM scratch as result FROM scratch AS result
ENV SRC_DIR=/go/src/github.com/k3s-io/k3s ENV SRC_DIR=/go/src/github.com/k3s-io/k3s
COPY --from=build ${SRC_DIR}/dist /dist COPY --from=build ${SRC_DIR}/dist /dist
COPY --from=build ${SRC_DIR}/bin /bin COPY --from=build ${SRC_DIR}/bin /bin
......
ARG GOLANG=golang:1.22.9-alpine3.19 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 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} WORKDIR ${K3S_SOURCE}
COPY . ${K3S_SOURCE} COPY . ${K3S_SOURCE}
FROM test-base as test-mods FROM test-base AS test-mods
COPY ./scripts/test-mods /bin/ COPY ./scripts/test-mods /bin/
ENTRYPOINT ["/bin/test-mods"] 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 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 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; \ RUN OS=linux; \
ARCH=$(go env GOARCH); \ ARCH=$(go env GOARCH); \
...@@ -30,7 +30,7 @@ RUN OS=linux; \ ...@@ -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; \ 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; chmod a+x /usr/local/bin/kubectl;
ENV TEST_CLEANUP true ENV TEST_CLEANUP=true
ENTRYPOINT ["./scripts/entry.sh"] ENTRYPOINT ["./scripts/entry.sh"]
CMD ["test"] CMD ["test"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment