Skip to content

Commit 2ec64e6

Browse files
Use ubi-minimal image instead of ubi go-toolset (#198)
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]> Co-authored-by: shoaebjindani <[email protected]>
1 parent 7289b71 commit 2ec64e6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Dockerfile

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
ARG GO_VER
22

33
########## Build operator binary ##########
4-
FROM registry.access.redhat.com/ubi8/go-toolset:$GO_VER as builder
4+
FROM registry.access.redhat.com/ubi8/ubi-minimal as builder
5+
6+
ARG GO_VER
7+
ARG ARCH
8+
9+
# gcc required for cgo
10+
RUN microdnf install -y tar gzip gcc
11+
12+
RUN curl -sL https://go.dev/dl/go${GO_VER}.linux-${ARCH}.tar.gz | tar zxf - -C /usr/local
13+
ENV PATH="/usr/local/go/bin:$PATH"
514

615
COPY . /go/src/github.com/IBM-Blockchain/fabric-operator
716
WORKDIR /go/src/github.com/IBM-Blockchain/fabric-operator

0 commit comments

Comments
 (0)