forked from fidelity/kraan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-check
31 lines (29 loc) · 830 Bytes
/
Dockerfile-check
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
# Build the manager binary
FROM golang:1.16 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# Copy the go source
COPY pkg/ pkg
COPY main/ main
COPY controllers/ controllers
COPY api/ api
RUN mkdir bin
# Copy makefiles and run tests
COPY Makefile Makefile
COPY makefile.mk makefile.mk
COPY project-name.mk project-name.mk
COPY .golangci.yml .golangci.yml
COPY bin/ bin/
RUN apt install -y curl
RUN bin/setup.sh
# Temporary fix see https://github.com/fidelity/kraan/issues/114
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.19.3/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv kubectl bin
RUN cp bin/* /usr/local/bin
# Make
RUN make clean
RUN PATH=$PATH:/usr/local/kubebuilder/bin make
RUN PATH=$PATH:/usr/local/kubebuilder/bin make integration