Skip to content

Commit 0f7c405

Browse files
Docker File Add
Signed-off-by: Muthu <muthu.sundaravadivel@in.ibm.com>
1 parent b3fcd45 commit 0f7c405

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ FROM registry.access.redhat.com/ubi9/ubi-minimal as builder
2222
ARG GO_VER
2323
ARG ARCH
2424
# gcc required for cgo
25-
2625
RUN microdnf install -y make gcc tar gzip gcc-c++ && microdnf clean all
2726
RUN echo "GO_VER=${GO_VER}" && echo "ARCH=${ARCH}"
28-
RUN curl -sL https://go.dev/dl/go${GO_VER}.linux-${ARCH}.tar.gz | tar zxf - -C /usr/local
27+
RUN test -n "$GO_VER" && test -n "$ARCH" || (echo "GO_VER or ARCH not set!" && exit 1)
28+
29+
RUN curl -sSL https://go.dev/dl/go${GO_VER}.linux-${ARCH}.tar.gz | tar zxf - -C /usr/local
30+
2931
ENV PATH="/usr/local/go/bin:$PATH"
3032
COPY . /go/src/github.ibm.com/fabric/fabric-chaincode-builder
3133
WORKDIR /go/src/github.ibm.com/fabric/fabric-chaincode-builder

0 commit comments

Comments
 (0)