k3s/Dockerfile.test

37 lines
1.1 KiB
Docker
Raw Normal View History

ARG GOLANG=golang:1.19.2-alpine3.15
FROM ${GOLANG} as test-base
2019-04-29 20:54:51 +00:00
RUN apk -U --no-cache add bash jq
ENV K3S_SOURCE /go/src/github.com/k3s-io/k3s/
WORKDIR ${K3S_SOURCE}
COPY . ${K3S_SOURCE}
From test-base as test-mods
COPY ./scripts/test-mods /bin/
ENTRYPOINT ["/bin/test-mods"]
From test-base as test-k3s
RUN apk -U --no-cache add git gcc musl-dev docker curl coreutils python3 openssl py3-pip procps
2019-04-29 20:54:51 +00:00
ENV SONOBUOY_VERSION 0.56.5
2019-04-29 20:54:51 +00:00
RUN OS=linux; \
ARCH=$(go env GOARCH); \
RELEASE=$(curl -fs https://storage.googleapis.com/kubernetes-release/release/stable.txt); \
2022-04-15 16:41:40 +00:00
if [ "${ARCH}" == "amd64" ] || [ "${ARCH}" == "arm64" ] || [ "${ARCH}" == "s390x" ]; then \
curl -sL "https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_${OS}_${ARCH}.tar.gz" | \
tar -xzf - -C /usr/local/bin; \
fi; \
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; \
pip install codespell
2019-04-29 20:54:51 +00:00
2019-11-01 16:48:28 +00:00
ENV TEST_CLEANUP true
2019-04-29 20:54:51 +00:00
ENTRYPOINT ["./scripts/entry.sh"]
CMD ["test"]