Skip to content

Commit

Permalink
Dockerfile: Use the ubi-minimal image
Browse files Browse the repository at this point in the history
This reduces the size of the ramen operator image by half.

This commit also removes the GO111MODULE=on flag as that has been the
default for quite a few releases in Go.

Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur committed Jan 26, 2024
1 parent f00d563 commit e58659e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ COPY main.go main.go
COPY controllers/ controllers/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go

FROM registry.access.redhat.com/ubi8/ubi
FROM registry.access.redhat.com/ubi8/ubi-minimal
WORKDIR /
COPY --from=builder /workspace/manager .

Expand Down

0 comments on commit e58659e

Please sign in to comment.