forked from openshift/baremetal-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ocp
20 lines (17 loc) · 1.32 KB
/
Dockerfile.ocp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.12 AS builder
WORKDIR /go/src/github.com/metal3-io/baremetal-operator
COPY . .
RUN CGO_ENABLED=0 GO111MODULE=on go build -a -o bin/baremetal-operator main.go
RUN make tools
RUN make tools/bin/kustomize
RUN cp /go/src/github.com/metal3-io/baremetal-operator/config/crd/ocp/ocp_kustomization.yaml /go/src/github.com/metal3-io/baremetal-operator/config/crd/kustomization.yaml &&\
tools/bin/kustomize build config/crd > config/crd/baremetalhost.crd.yaml &&\
mkdir /go/src/github.com/metal3-io/baremetal-operator/manifests &&\
cp /go/src/github.com/metal3-io/baremetal-operator/config/crd/baremetalhost.crd.yaml /go/src/github.com/metal3-io/baremetal-operator/manifests/0000_31_cluster-baremetal-operator_00_baremetalhost.crd.yaml
FROM registry.ci.openshift.org/ocp/4.12:base
COPY --from=builder /go/src/github.com/metal3-io/baremetal-operator/bin/baremetal-operator /
COPY --from=builder /go/src/github.com/metal3-io/baremetal-operator/bin/get-hardware-details /
COPY --from=builder /go/src/github.com/metal3-io/baremetal-operator/bin/make-bm-worker /
COPY --from=builder /go/src/github.com/metal3-io/baremetal-operator/bin/make-virt-host /
COPY --from=builder /go/src/github.com/metal3-io/baremetal-operator/manifests /manifests
LABEL io.openshift.release.operator=true