Skip to content

Commit

Permalink
Use ubi-minimal image instead of ubi go-toolset
Browse files Browse the repository at this point in the history
go-toolset doesn't have the latest versions of Go.
Therefore use the ubi minimal image and install our preferred version of Go
when building operator.

Signed-off-by: David Enyeart <[email protected]>
  • Loading branch information
denyeart committed Jul 18, 2024
1 parent 01bdda4 commit a59589e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
ARG GO_VER

########## Build operator binary ##########
FROM registry.access.redhat.com/ubi8/go-toolset:$GO_VER as builder
FROM registry.access.redhat.com/ubi8/ubi-minimal as builder

ARG GO_VER
ARG ARCH

# gcc required for cgo
RUN microdnf install -y tar gzip gcc

RUN curl -sL https://go.dev/dl/go${GO_VER}.linux-${ARCH}.tar.gz | tar zxf - -C /usr/local
ENV PATH="/usr/local/go/bin:$PATH"

COPY . /go/src/github.com/IBM-Blockchain/fabric-operator
WORKDIR /go/src/github.com/IBM-Blockchain/fabric-operator
Expand Down

0 comments on commit a59589e

Please sign in to comment.