forked from rancher/eks-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
31 lines (25 loc) · 1.26 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
FROM registry.suse.com/bci/bci-base:15.4
ARG DAPPER_HOST_ARCH
ENV ARCH=${DAPPER_HOST_ARCH}
RUN zypper -n update && \
zypper -n install bash git binutils glibc-devel-static gcc vim less file tar gzip curl sed wget ca-certificates
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
RUN curl -sLf https://storage.googleapis.com/golang/go1.19.3.linux-${ARCH}.tar.gz | tar -xzf - -C /usr/local/
# workaround for https://bugzilla.suse.com/show_bug.cgi?id=1183043
RUN if [ "${ARCH}" == "arm64" ]; then \
zypper -n install binutils-gold ; \
fi
RUN if [ "${ARCH}" = "amd64" ]; then \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.40.1; \
fi
RUN curl -sL https://get.helm.sh/helm-v3.3.0-linux-${ARCH}.tar.gz | tar xvzf - -C /usr/local/bin --strip-components=1
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
ENV DAPPER_SOURCE /go/src/github.com/rancher/eks-operator/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_RUN_ARGS "-v eks-operator-pkg:/go/pkg -v eks-operator-cache:/root/.cache"
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]