-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile.dapper
32 lines (25 loc) · 1.43 KB
/
Dockerfile.dapper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM golang:1.23
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
RUN export K8S_VERSION=1.28.0 && \
curl -sSLo envtest-bins.tar.gz "https://go.kubebuilder.io/test-tools/${K8S_VERSION}/$(go env GOOS)/$(go env GOARCH)" && \
mkdir /usr/local/kubebuilder && \
tar -C /usr/local/kubebuilder --strip-components=1 -zvxf envtest-bins.tar.gz && \
curl -sSLo kustomize.tar.gz "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.7/kustomize_v4.5.7_linux_amd64.tar.gz" && \
tar -C /usr/bin --strip-components=1 -zxvf kustomize.tar.gz && \
go install sigs.k8s.io/controller-tools/cmd/[email protected]
RUN apt update && \
apt install -y bash git gcc docker.io vim less file curl wget ca-certificates qemu-utils
## install golangci
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.63.4
# The docker version in dapper is too old to have buildx. Install it manually.
RUN curl -sSfL https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} -o buildx-v0.13.1.linux-${ARCH} && \
chmod +x buildx-v0.13.1.linux-${ARCH} && \
mv buildx-v0.13.1.linux-${ARCH} /usr/local/bin/buildx
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS SKIPINDRONE
ENV DAPPER_SOURCE /go/src/github.com/harvester/seeder
ENV DAPPER_OUTPUT ./bin ./pkg ./config
ENV DAPPER_DOCKER_SOCKET true
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]