Skip to content

Commit cd5728e

Browse files
Merge pull request #7 from arjunrn/main
UPSTREAM: <carry>: Switch to UBI for builder image
2 parents b23fa08 + b166f9d commit cd5728e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Dockerfile.openshift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# TODO: Switch to UBI golang image when 1.17 is released
2-
# FROM registry.access.redhat.com/ubi8/go-toolset:latest AS builder
3-
FROM golang:1.17 AS builder
1+
FROM registry.access.redhat.com/ubi8/go-toolset:1.16.12 AS builder
42

5-
WORKDIR /workspace
3+
WORKDIR /opt/app-root/src
64

75
# Copy the dependencies which don't change frequently
86
COPY go.mod go.mod
@@ -17,8 +15,8 @@ COPY pkg pkg
1715
COPY webhooks webhooks
1816

1917
# Build the controller
20-
RUN go build -mod=vendor -o bin/controller main.go
18+
RUN go build -mod=vendor -o controller main.go
2119

2220
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
23-
COPY --from=builder /workspace/bin/controller /usr/bin/controller
21+
COPY --from=builder /opt/app-root/src/controller /usr/bin/controller
2422
ENTRYPOINT ["/usr/bin/controller"]

0 commit comments

Comments
 (0)