-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDockerfile.dlv
More file actions
33 lines (25 loc) · 1.17 KB
/
Dockerfile.dlv
File metadata and controls
33 lines (25 loc) · 1.17 KB
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.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder
ENV CGO_ENABLED=1
ENV GOOS=linux
ENV GOPATH=/go
WORKDIR /
COPY . .
RUN GOFLAGS='' go install github.com/go-delve/delve/cmd/dlv@latest
#RUN hack/build-go.sh
RUN go build -gcflags="all=-N -l" -o cloud-event-proxy cmd/main.go
RUN go build -gcflags="all=-N -l" -a -o plugins/ptp_operator_plugin.so -buildmode=plugin plugins/ptp_operator/ptp_operator_plugin.go
RUN go build -gcflags="all=-N -l" -a -o plugins/mock_plugin.so -buildmode=plugin plugins/mock/mock_plugin.go
FROM registry.ci.openshift.org/ocp/4.19:base-rhel9 AS bin
COPY --from=builder /cloud-event-proxy /
COPY --from=builder /plugins/*.so /plugins/
COPY --from=builder /go/bin/dlv /
COPY --from=builder /usr/bin/go /usr/bin/go
COPY --from=builder /usr/bin/go.real /usr/bin/go.real
RUN mkdir /go
LABEL io.k8s.display-name="Cloud Event Proxy" \
io.k8s.description="This is a component of OpenShift Container Platform and provides a side car to handle cloud events." \
io.openshift.tags="openshift" \
maintainer="Aneesh Puttur <aputtur@redhat.com>"
ENV GOROOT=/go \
PATH=$PATH:$GOROOT/bin
ENTRYPOINT ["./cloud-event-proxy"]