Skip to content

Update dependencies for Golang and Node #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Dockerfile2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#


FROM golang:1.18 AS builder
FROM golang:1.22 AS builder
ENV DEBIAN_FRONTEND=noninteractive

# Build tools
Expand All @@ -14,7 +14,7 @@ RUN apt-get update \

WORKDIR $GOPATH/src/github.com/hyperledger
RUN git clone --depth 1 --branch release-2.5 https://github.com/hyperledger/fabric.git \
&& git clone --depth 1 --branch v1.5.5 https://github.com/hyperledger/fabric-ca.git
&& git clone --depth 1 --branch v1.5.11 https://github.com/hyperledger/fabric-ca.git
WORKDIR $GOPATH/src/github.com/hyperledger/fabric
ENV CGO_ENABLED=0
RUN make orderer \
Expand All @@ -31,7 +31,7 @@ ADD . $GOPATH/src/github.com/IBM/microfab
RUN go build -o microfabd cmd/microfabd/main.go

WORKDIR /fabric
RUN curl -sSL https://github.com/hyperledger/fabric/releases/download/v2.4.6/hyperledger-fabric-linux-amd64-2.4.6.tar.gz | tar xzf - config
RUN curl -sSL https://github.com/hyperledger/fabric/releases/download/v2.5.8/hyperledger-fabric-linux-amd64-2.5.8.tar.gz | tar xzf - config


# RUN FABRIC_DOCKER_REGISTRY=ghcr.io/hyperledger \
Expand All @@ -56,20 +56,20 @@ RUN groupadd -g 7051 microfab \
# go1.19.4.linux-amd64.tar.gz
# go1.19.4.linux-arm64.tar.gz
RUN mkdir -p /opt/go /opt/node /opt/java \
&& curl -sSL https://dl.google.com/go/go1.17.2.$TARGETOS-$TARGETARCH.tar.gz | tar xzf - -C /opt/go --strip-components=1
&& curl -sSL curl -sL https://go.dev/dl/go1.22.3.${TARGETOS}-${TARGETARCH}.tar.gz | tar xzf - -C /opt/go --strip-components=1

# OpenJDK11U-jdk_x64_linux_hotspot_11.0.17_8.tar.gz
# node-v18.12.1-linux-x64.tar.xz
RUN if [ "${TARGETARCH}" = "amd64" ]; then ARCH=x64 \
&& curl -sSL https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.17%2B8/OpenJDK11U-jdk_${ARCH}_${TARGETOS}_hotspot_11.0.17_8.tar.gz | tar xzf - -C /opt/java --strip-components=1 \
&& curl -sSL https://nodejs.org/download/release/v16.4.0/node-v16.4.0-${TARGETOS}-${ARCH}.tar.xz | tar xJf - -C /opt/node --strip-components=1 \
&& curl -sSL https://nodejs.org/download/release/v20.14.0/node-v20.14.0-${TARGETOS}-${ARCH}.tar.xz | tar xJf - -C /opt/node --strip-components=1 \
; fi

# node-v18.12.1-linux-arm64.tar.xz
# OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.17_8.tar.gz
RUN if [ "${TARGETARCH}" = "arm64" ]; then ARCH=aarch64 \
&& curl -sSL https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.17%2B8/OpenJDK11U-jdk_${ARCH}_${TARGETOS}_hotspot_11.0.17_8.tar.gz | tar xzf - -C /opt/java --strip-components=1 \
&& curl -sSL https://nodejs.org/download/release/v16.4.0/node-v16.4.0-${TARGETOS}-${TARGETARCH}.tar.xz | tar xJf - -C /opt/node --strip-components=1 \
&& curl -sSL https://nodejs.org/download/release/v20.14.0/node-v20.14.0-${TARGETOS}-${TARGETARCH}.tar.xz | tar xJf - -C /opt/node --strip-components=1 \
; fi


Expand Down Expand Up @@ -98,8 +98,8 @@ RUN curl -sSL -o /tmp/gradle.zip https://services.gradle.org/distributions/gradl
&& rm -f /tmp/gradle.zip \
&& rm -rf /opt/gradle-5.6.4 \
&& cd - \
&& curl -sSL https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | tar xzf - -C /opt \
&& mv /opt/apache-maven-3.6.3 /opt/maven
&& curl -sSL https://dlcdn.apache.org/maven/maven-3/3.9.7/binaries/apache-maven-3.9.7-bin.tar.gz | tar xzf - -C /opt \
&& mv /opt/apache-maven-3.9.7 /opt/maven
ENV PATH=/opt/gradle/bin:/opt/maven/bin:${PATH}
ADD builders/java/pom.xml /opt/fabric-chaincode-java/

Expand Down
7 changes: 7 additions & 0 deletions scripts/test-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ docker run -d --name microfab -p 8080:8080 --add-host host.docker.internal:host
# Get the configuration and extract the information
sleep 25

docker ps -a


docker exec -it dev-microfab ps -ef

docker logs dev-microfab

curl -sSL --insecure https://console.127-0-0-1.nip.io:8080/ak/api/v1/components
curl -sSL --insecure https://console.127-0-0-1.nip.io:8080/ak/api/v1/components | npx @hyperledger-labs/weft microfab -w $CFG/_wallets -p $CFG/_gateways -m $CFG/_msp -f

Expand Down
Loading