forked from interlay/interbtc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (24 loc) · 911 Bytes
/
Dockerfile
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
# Standalone build
FROM rust:bullseye as build
ENV DEBIAN_FRONTEND=noninteractive
ARG PROFILE=release
ARG BINARY=interbtc-standalone
WORKDIR /src
COPY . /src
RUN apt-get update && \
apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \
apt-get install -y cmake pkg-config libssl-dev git llvm-dev libclang-dev clang gcc-multilib
RUN cargo build "--$PROFILE"
FROM ubuntu:20.04
ARG PROFILE=release
ARG BINARY=interbtc-standalone
COPY --from=build /src/target/$PROFILE/${BINARY} /usr/local/bin
# Checks
RUN chmod +x /usr/local/bin/${BINARY} && \
ldd /usr/local/bin/${BINARY} && \
/usr/local/bin/${BINARY} --version
RUN /usr/local/bin/${BINARY} export-genesis-state --chain staging > /var/lib/genesis-state
RUN /usr/local/bin/${BINARY} export-genesis-wasm --chain staging > /var/lib/genesis-wasm
EXPOSE 30333 9933 9944
VOLUME ["/data"]
ENTRYPOINT ["/usr/local/bin/${BINARY}"]