forked from x402-rs/x402-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (20 loc) · 663 Bytes
/
Dockerfile
File metadata and controls
32 lines (20 loc) · 663 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
FROM --platform=$BUILDPLATFORM rust:bullseye AS builder
ENV PORT=8080
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
COPY . ./
RUN cargo build --release --locked
# --- Stage 2 ---
FROM --platform=$BUILDPLATFORM debian:bullseye-slim
ENV PORT=8080
# much smaller than full ubuntu (~22MB compressed)
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/target/release/x402-rs /usr/local/bin/x402-rs
EXPOSE $PORT
ENV RUST_LOG=info
ENTRYPOINT ["x402-rs"]