2021-12-01 21:14:59 +00:00
|
|
|
ARG GOLANG=golang:1.17.5-alpine3.15
|
2021-03-19 18:50:37 +00:00
|
|
|
FROM ${GOLANG}
|
2019-04-29 20:54:51 +00:00
|
|
|
|
2021-12-18 08:16:03 +00:00
|
|
|
RUN apk -U --no-cache add bash git gcc musl-dev docker curl jq coreutils python3 openssl py3-pip procps
|
2019-04-29 20:54:51 +00:00
|
|
|
|
2021-11-19 02:29:21 +00:00
|
|
|
ENV SONOBUOY_VERSION 0.55.0
|
2019-04-29 20:54:51 +00:00
|
|
|
|
2020-11-17 20:21:12 +00:00
|
|
|
RUN OS=linux; \
|
|
|
|
ARCH=$(go env GOARCH); \
|
|
|
|
RELEASE=$(curl -fs https://storage.googleapis.com/kubernetes-release/release/stable.txt); \
|
|
|
|
if [ "${ARCH}" == "amd64" ] || [ "${ARCH}" == "arm64" ]; 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; \
|
2020-12-22 20:35:58 +00:00
|
|
|
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
|
|
|
|
|
2020-12-15 00:26:14 +00:00
|
|
|
ENV DAPPER_RUN_ARGS --privileged --network host -v /tmp:/tmp
|
|
|
|
ENV DAPPER_ENV REPO TAG DRONE_TAG DRONE_BUILD_EVENT IMAGE_NAME GCLOUD_AUTH SONOBUOY_VERSION ENABLE_REGISTRY
|
2022-03-02 23:47:27 +00:00
|
|
|
ENV DAPPER_SOURCE /go/src/github.com/k3s-io/k3s/
|
2019-04-29 20:54:51 +00:00
|
|
|
ENV DAPPER_OUTPUT ./dist
|
|
|
|
ENV DAPPER_DOCKER_SOCKET true
|
|
|
|
ENV HOME ${DAPPER_SOURCE}
|
|
|
|
WORKDIR ${DAPPER_SOURCE}
|
|
|
|
|
|
|
|
ENTRYPOINT ["./scripts/entry.sh"]
|
2019-11-01 16:48:28 +00:00
|
|
|
CMD ["test"]
|