forked from rancher/security-scan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
33 lines (26 loc) · 992 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
32
33
FROM registry.suse.com/bci/golang:1.19
ARG KIND_VERSION=0.17.0
ARG KUBERNETES_VERSION=1.28.0
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
RUN zypper --non-interactive install git docker less curl wget gettext awk
RUN go install golang.org/x/lint/golint@latest
RUN go install golang.org/x/tools/cmd/goimports@latest
RUN curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-linux-${ARCH}" && \
chmod +x ./kind && \
mv ./kind /usr/local/bin/
RUN curl -Lo ./kubectl "https://dl.k8s.io/release/v${KUBERNETES_VERSION}/bin/linux/${ARCH}/kubectl" && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/
ENV DAPPER_ENV REPO TAG DRONE_TAG
ENV DAPPER_SOURCE /go/src/github.com/rancher/security-scan/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
# Cache go modules
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]