Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.31] 2025 January Backports #11588

Merged
merged 6 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix docker check warnings (#11474)
Signed-off-by: Derek Nola <derek.nola@suse.com>
  • Loading branch information
dereknola committed Jan 13, 2025
commit 634bf534ffe828d95fed4c1be6eef119b2951ccb
16 changes: 8 additions & 8 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -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.1
ENV SONOBUOY_VERSION=0.57.2

RUN OS=linux; \
ARCH=$(go env GOARCH); \
Expand All @@ -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"]
Expand Down