forked from harvester/pcidevices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
32 lines (27 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
32
FROM registry.suse.com/bci/bci-base:15.4
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
RUN zypper -n ar https://download.opensuse.org/repositories/hardware/15.4/hardware.repo && \
zypper -n --gpg-auto-import-keys refresh && \
zypper -n install bash git gcc docker vim less file curl wget ca-certificates pciutils go umockdev
RUN go install golang.org/x/lint/golint@latest
RUN go install golang.org/x/tools/cmd/goimports@latest
RUN go install github.com/incu6us/goimports-reviser/v3@latest
RUN export K8S_VERSION=1.24.2 && \
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
## install golangci
RUN if [ "${ARCH}" = "amd64" ]; then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.49.0; \
fi
ENV GO111MODULE on
ENV DAPPER_ENV REPO TAG DRONE_TAG
ENV DAPPER_SOURCE /go/src/github.com/harvester/pcidevices/
ENV DAPPER_OUTPUT ./bin ./dist ./pkg
ENV DAPPER_RUN_ARGS "-v /proc:/host/proc --privileged"
ENV DAPPER_DOCKER_SOCKET true
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]