-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile.dapper
31 lines (23 loc) · 1.12 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/golang:1.22
ARG DAPPER_HOST_ARCH
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
RUN zypper -n rm container-suseconnect && \
zypper -n install git curl docker gzip tar wget awk
## install golangci
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.1
# 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
## install controller-gen
RUN go install sigs.k8s.io/controller-tools/cmd/[email protected]
# install openapi-gen
RUN go install k8s.io/code-generator/cmd/[email protected]
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS BUILD_FOR_CI
ENV DAPPER_SOURCE /go/src/github.com/harvester/node-disk-manager/
ENV DAPPER_OUTPUT ./bin ./manifests ./pkg
ENV DAPPER_DOCKER_SOCKET true
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]