forked from zkweb3/quilibrium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.source
71 lines (49 loc) · 1.99 KB
/
Dockerfile.source
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
FROM golang:1.22.4-bullseye as build-base
ENV PATH="${PATH}:/root/.cargo/bin/"
# Install GMP 6.2 (6.3 which MacOS is using only available on Debian unstable)
RUN apt-get update && apt-get install -y \
libgmp-dev \
&& rm -rf /var/lib/apt/lists/*
COPY docker/rustup-init.sh /opt/rustup-init.sh
RUN chmod +x /opt/rustup-init.sh && /opt/rustup-init.sh -y --profile minimal
# Install uniffi-bindgen-go
RUN cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.1+v0.25.0
FROM build-base as build
ENV GOEXPERIMENT=arenas
ENV QUILIBRIUM_SIGNATURE_CHECK=false
WORKDIR /opt/ceremonyclient
COPY . .
## Generate Rust bindings for VDF
WORKDIR /opt/ceremonyclient/vdf
RUN chmod +x ./generate.sh && ./generate.sh
# Build and install the node
WORKDIR /opt/ceremonyclient/node
RUN chmod +x ./build.sh && ./build.sh && cp node /go/bin
RUN go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
# Build and install qclient
WORKDIR /opt/ceremonyclient/client
RUN go build -o qclient ./main.go
# Allows exporting single binary
FROM scratch AS node
COPY --from=build /go/bin/node /node
ENTRYPOINT [ "/node" ]
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
COPY --from=build /go/bin/node /usr/local/bin
COPY --from=build /go/bin/grpcurl /usr/local/bin
COPY --from=build /opt/ceremonyclient/client/qclient /usr/local/bin
WORKDIR /root
ENTRYPOINT ["node"]