-
Notifications
You must be signed in to change notification settings - Fork 42
/
Dockerfile
33 lines (25 loc) · 890 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
FROM debian:11.6-slim@sha256:171530d298096f0697da36b3324182e872db77c66452b85783ea893680cc1b62 AS builder
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
git \
libssl-dev \
pkg-config
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup default 1.74.0
WORKDIR /opt/app
COPY Cargo.* ./
COPY florestad/ florestad/
COPY crates/ crates/
COPY fuzz/ fuzz/
RUN --mount=type=cache,target=/usr/local/cargo/registry \
cargo build --release
FROM debian:11.6-slim@sha256:171530d298096f0697da36b3324182e872db77c66452b85783ea893680cc1b62
COPY --from=builder /opt/app/target/release/florestad /usr/local/bin/florestad
COPY --from=builder /opt/app/target/release/floresta_cli /usr/local/bin/floresta-cli
RUN chmod +x /usr/local/bin/florestad
EXPOSE 50001
EXPOSE 8332
CMD [ "florestad" ]