Skip to content

Commit

Permalink
Fix docker check warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola committed Dec 17, 2024
1 parent bb32254 commit bde988b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
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.2
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

0 comments on commit bde988b

Please sign in to comment.