Skip to content

Commit 1ff7932

Browse files
Fedosincloud-team-rebase-bot
authored andcommitted
UPSTREAM: <carry>: Add a Dockerfile that compatible with OpenShift
1 parent 97716e3 commit 1ff7932

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.9 AS builder
2+
3+
WORKDIR /build
4+
COPY . .
5+
RUN CGO_ENABLED=0 GOOS=${GOOS} GOPROXY=${GOPROXY} go build \
6+
-ldflags="-w -s -X 'main.version=${VERSION}'" \
7+
-o=gcp-cloud-controller-manager \
8+
cmd/cloud-controller-manager/main.go
9+
10+
FROM registry.ci.openshift.org/ocp/4.9:base
11+
12+
LABEL description="GCP Cloud Controller Manager"
13+
14+
COPY --from=builder /build/gcp-cloud-controller-manager /bin/gcp-cloud-controller-manager
15+
16+
ENTRYPOINT [ "/bin/gcp-cloud-controller-manager" ]

0 commit comments

Comments
 (0)