-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 1.06 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
# Build stage
FROM rust:1.91-bookworm AS builder
WORKDIR /app
# System deps for Rust builds + Node.js for frontend bundling.
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
pkg-config \
libssl-dev \
cmake \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# Copy source
COPY . .
# Build release binary (this will also build+embed the frontend via build.rs)
RUN cargo build --release -p miden-faucet
# Runtime stage
FROM debian:bookworm-slim
# Runtime deps (TLS roots + OpenSSL for rustls/native-tls stacks).
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/miden-faucet /usr/local/bin/miden-faucet
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 8000 8080
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["start"]