forked from rancher/prometheus-federator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
31 lines (24 loc) · 1017 Bytes
/
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/golang:1.20 AS helm
RUN zypper -n install git
RUN git -C / clone --branch release-v3.9.0 --depth=1 https://github.com/rancher/helm
RUN make -C /helm
FROM registry.suse.com/bci/golang:1.20
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
RUN zypper -n install git docker vim less file curl wget patch
RUN go install golang.org/x/tools/cmd/goimports@latest
RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.50.1; \
fi
ENV YQ_VERSION=v4.25.1
RUN wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${ARCH} -O /usr/bin/yq && chmod +x /usr/bin/yq;
COPY --from=helm ./helm/bin/helm /usr/local/bin/
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
ENV DAPPER_SOURCE /go/src/github.com/rancher/prometheus-federator/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
ENV GOPATH /go
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]