forked from tangle-network/protocol-substrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Standalone.Dockerfile
32 lines (24 loc) · 978 Bytes
/
Standalone.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
FROM rust:1 as builder
WORKDIR /webb
# Install Required Packages
RUN apt-get update && \
apt-get install -y git pkg-config clang curl libssl-dev llvm libudev-dev libgmp3-dev && \
rm -rf /var/lib/apt/lists/*
COPY . .
# Build Standalone Node.
RUN git submodule update --init && \
cargo build --release -p webb-standalone-node
# This is the 2nd stage: a very small image where we copy the Node binary."
FROM ubuntu:20.04
COPY --from=builder /webb/target/release/webb-standalone-node /usr/local/bin
RUN apt-get update && apt-get install -y clang libssl-dev llvm libudev-dev libgmp3-dev && rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 -U -s /bin/sh -d /webb webb && \
mkdir -p /data /webb/.local/share/webb && \
chown -R webb:webb /data && \
ln -s /data /webb/.local/share/webb && \
# Sanity checks
ldd /usr/local/bin/webb-standalone-node && \
/usr/local/bin/webb-standalone-node --version
USER webb
EXPOSE 30333 9933 9944 9615 33334
VOLUME ["/data"]