mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
10474638d7
* Remove unused release.sh and DAPPER_HOST_ARCH * Reliably use ARCH from version.sh * Export GOARCH and GOARM so that they are used by `go build` Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
29 lines
1.1 KiB
Docker
29 lines
1.1 KiB
Docker
FROM golang:1.15.2-alpine3.12
|
|
|
|
RUN apk -U --no-cache add bash git gcc musl-dev docker curl jq coreutils python2 openssl
|
|
|
|
ENV SONOBUOY_VERSION 0.19.0
|
|
|
|
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; \
|
|
chmod a+x /usr/local/bin/kubectl
|
|
|
|
ENV TEST_CLEANUP true
|
|
|
|
ENV DAPPER_RUN_ARGS --privileged --network host
|
|
ENV DAPPER_ENV REPO TAG DRONE_TAG DRONE_BUILD_EVENT IMAGE_NAME GCLOUD_AUTH SONOBUOY_VERSION
|
|
ENV DAPPER_SOURCE /go/src/github.com/rancher/k3s/
|
|
ENV DAPPER_OUTPUT ./dist
|
|
ENV DAPPER_DOCKER_SOCKET true
|
|
ENV HOME ${DAPPER_SOURCE}
|
|
WORKDIR ${DAPPER_SOURCE}
|
|
|
|
ENTRYPOINT ["./scripts/entry.sh"]
|
|
CMD ["test"]
|