-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (38 loc) · 1.16 KB
/
Dockerfile
File metadata and controls
47 lines (38 loc) · 1.16 KB
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
44
45
46
47
FROM debian:13.2-slim@sha256:18764e98673c3baf1a6f8d960b5b5a1ec69092049522abac4e24a7726425b016 AS builder
ARG BUILD_FEATURES=""
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
clang \
libclang-dev \
git \
libssl-dev \
pkg-config \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup default 1.81.0
WORKDIR /opt/app
COPY README.md .
COPY Cargo.* ./
COPY bin/ bin/
COPY crates/ crates/
COPY fuzz/ fuzz/
COPY metrics/ metrics/
COPY doc/ doc/
RUN --mount=type=cache,target=/usr/local/cargo/registry \
if [ -n "$BUILD_FEATURES" ]; then \
cargo build --release --features "$BUILD_FEATURES"; \
else \
cargo build --release; \
fi
FROM debian:13.2-slim@sha256:18764e98673c3baf1a6f8d960b5b5a1ec69092049522abac4e24a7726425b016
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
EXPOSE 3333
CMD [ "florestad" ]