-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (34 loc) · 904 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
37
38
39
40
41
42
43
# Phase 0: Builder
# =========================
FROM paritytech/ci-linux:production as builder
RUN apt-get update && \
apt-get install -y git openssh-client && \
rm -rf /var/lib/apt/lists && \
mkdir -p /avail
COPY . /avail/
RUN \
mkdir -p /da/bin && \
mkdir -p /da/genesis && \
# Build DA \
cp -r /avail/misc/genesis /da && \
cd /avail && \
cargo build --release -p data-avail && \
# Install binaries \
mv target/release/data-avail /da/bin
# Phase 1: Binary deploy
# =========================
FROM debian:buster-slim
RUN apt-get update && \
apt-get install -y curl && \
rm -rf /var/lib/apt/lists
COPY --from=builder /da/ /da
COPY entrypoint.sh /
WORKDIR /da
ENV \
DA_CHAIN="/da/genesis/testnet.chain.spec.raw.json" \
DA_NAME="AvailNode" \
DA_MAX_IN_PEERS=50 \
DA_MAX_OUT_PEERS=50 \
DA_P2P_PORT="30333"
VOLUME ["/tmp", "/da/state", "/da/keystore"]
ENTRYPOINT ["/entrypoint.sh"]