Skip to content

Commit

Permalink
use release version: node and qclient
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhi committed Oct 15, 2024
1 parent 2f450a9 commit 6714845
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM golang:1.23.2-alpine3.20 as build

ARG NODE_VERSION
ARG QCLI_VERSION
ARG MAX_KEY_ID

ENV GOEXPERIMENT=arenas
Expand All @@ -9,17 +10,35 @@ WORKDIR /opt/ceremonyclient

COPY . .

RUN cp "node/node-${NODE_VERSION}-linux-amd64" "node/node"
RUN cp "node/node-${NODE_VERSION}-linux-amd64.dgst" "node/node.dgst"
RUN apk update && apk --no-cache add curl

RUN NFILES=$(curl -s "https://releases.quilibrium.com/release" | grep "linux-amd64") && \
for f in $NFILES; do \
echo $f; [ -f $f ] && rm $f; \
curl -s -O https://releases.quilibrium.com/$f; \
done
RUN cp "node-${NODE_VERSION}-linux-amd64" "node/node"
RUN cp "node-${NODE_VERSION}-linux-amd64.dgst" "node/node.dgst"
RUN for i in $(seq 1 ${MAX_KEY_ID}); do \
if [ -f node/node-${NODE_VERSION}-linux-amd64.dgst.sig.${i} ]; then \
cp "node/node-${NODE_VERSION}-linux-amd64.dgst.sig.${i}" "node/node.dgst.sig.${i}"; \
cp "node-${NODE_VERSION}-linux-amd64.dgst.sig.${i}" "node/node.dgst.sig.${i}"; \
fi \
done

WORKDIR /opt/ceremonyclient/client

RUN go mod tidy && go build -o qclient ./main.go
RUN QFILES=$(curl -s "https://releases.quilibrium.com/qclient-release" | grep "linux-amd64") && \
for f in $QFILES; do \
echo $f; [ -f $f ] && rm $f; \
curl -s -O https://releases.quilibrium.com/$f; \
done
RUN mv "qclient-${QCLI_VERSION}-linux-amd64" "qclient"
RUN mv "qclient-${QCLI_VERSION}-linux-amd64.dgst" "qclient.dgst"
RUN for i in $(seq 1 ${MAX_KEY_ID}); do \
if [ -f qclient-${QCLI_VERSION}-linux-amd64.dgst.sig.${i} ]; then \
mv "qclient-${QCLI_VERSION}-linux-amd64.dgst.sig.${i}" "qclient.dgst.sig.${i}"; \
fi \
done

RUN go install github.com/fullstorydev/grpcurl/cmd/[email protected]

Expand Down

0 comments on commit 6714845

Please sign in to comment.