-
Notifications
You must be signed in to change notification settings - Fork 69
/
Dockerfile.dapper
35 lines (29 loc) · 1.19 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
33
34
35
FROM registry.suse.com/bci/golang:1.23
# Add buildx plugin
COPY --from=docker.io/docker/buildx-bin:0.17.1 /buildx /usr/libexec/docker/cli-plugins/docker-buildx
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
RUN zypper -n in git-core curl tar gzip docker wget awk hostname && \
zypper -n clean -a && \
rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/*
RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.61.0; \
fi
RUN curl -sL https://get.helm.sh/helm-v3.9.0-linux-${ARCH}.tar.gz | tar xvzf - -C /usr/local/bin --strip-components=1
RUN if [ "${ARCH}" != "s390x" ]; then \
helm plugin install https://github.com/quintush/helm-unittest; \
fi
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS CROSS_ARCH USE_DOCKER_BUILDX TARGET_ARCH
ENV DAPPER_SOURCE /go/src/github.com/rancher/backup-restore-operator/
ENV DAPPER_OUTPUT ./bin ./dist
ENV GOCACHE /root/.cache/go-build
ENV GOPATH /go
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_RUN_ARGS --privileged
VOLUME /var/lib/rancher/k3s
VOLUME /var/lib/cni
VOLUME /var/log
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]