-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.release
81 lines (61 loc) · 2.71 KB
/
Dockerfile.release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM golang:1.23.2-alpine3.20 as build
ARG NODE_VERSION
ARG QCLI_VERSION
ARG MAX_KEY_ID
ENV GOEXPERIMENT=arenas
WORKDIR /opt/ceremonyclient
COPY . .
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_VERSION}-linux-amd64.dgst.sig.${i} ]; then \
cp "node-${NODE_VERSION}-linux-amd64.dgst.sig.${i}" "node/node.dgst.sig.${i}"; \
fi \
done
WORKDIR /opt/ceremonyclient/client
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]
# FROM alpine:3.20
FROM debian:bullseye
ARG NODE_VERSION
ARG GIT_REPO
ARG GIT_BRANCH
ARG GIT_COMMIT
ENV GOEXPERIMENT=arenas
LABEL org.opencontainers.image.title="Quilibrium Network Node"
LABEL org.opencontainers.image.description="Quilibrium is a decentralized alternative to platform as a service providers."
LABEL org.opencontainers.image.version=$NODE_VERSION
LABEL org.opencontainers.image.vendor=Quilibrium
LABEL org.opencontainers.image.url=https://quilibrium.com/
LABEL org.opencontainers.image.documentation=https://quilibrium.com/docs
LABEL org.opencontainers.image.source=$GIT_REPO
LABEL org.opencontainers.image.ref.name=$GIT_BRANCH
LABEL org.opencontainers.image.revision=$GIT_COMMIT
RUN apt-get update && apt-get install -y ca-certificates
COPY --from=build /opt/ceremonyclient/node/node /usr/local/bin
COPY --from=build /opt/ceremonyclient/node/node.dgst /usr/local/bin
COPY --from=build /opt/ceremonyclient/node/node.dgst.sig.* /usr/local/bin
COPY --from=build /opt/ceremonyclient/client/qclient /usr/local/bin
COPY --from=build /opt/ceremonyclient/client/qclient.dgst /usr/local/bin
COPY --from=build /opt/ceremonyclient/client/qclient.dgst.sig.* /usr/local/bin
COPY --from=build /go/bin/grpcurl /usr/local/bin
RUN chmod +x /usr/local/bin/node && chmod +x /usr/local/bin/qclient
WORKDIR /root
ENTRYPOINT ["node"]