-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (26 loc) · 838 Bytes
/
Dockerfile
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
36
37
# Build the manager binary
FROM golang:1.17 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY vendor/ vendor/
COPY hack/boilerplate.go.txt hack/boilerplate.go.txt
COPY scripts/csv-generator.go scripts/csv-generator.go
# Copy the go source
COPY Makefile Makefile
COPY main.go main.go
COPY api/ api/
COPY controllers/ controllers/
COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on make manager
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on make csv-generator
FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL org.kubevirt.hco.csv-generator.v1="/csv-generator"
WORKDIR /
COPY --from=builder /workspace/bin/manager .
COPY data/ data/
# Copy csv generator
COPY --from=builder /workspace/bin/csv-generator .
ENTRYPOINT ["/manager"]