-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.mesh-node
More file actions
38 lines (26 loc) · 879 Bytes
/
Dockerfile.mesh-node
File metadata and controls
38 lines (26 loc) · 879 Bytes
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
FROM rust:1.75-slim as builder
WORKDIR /build
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release --bin beacon-mesh-node
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/target/release/beacon-mesh-node /usr/local/bin/
RUN curl -L https://github.com/a16z/helios/releases/download/v0.3.4/helios-x86_64-unknown-linux-gnu \
-o /usr/local/bin/helios && chmod +x /usr/local/bin/helios
RUN useradd -m -u 1000 beacon && \
mkdir -p /var/lib/beacon-mesh && \
chown -R beacon:beacon /var/lib/beacon-mesh
USER beacon
WORKDIR /var/lib/beacon-mesh
EXPOSE 9001 30303
ENTRYPOINT ["beacon-mesh-node"]