every.channel/deploy/cloudflare-worker/containers/ec-api/Dockerfile
2026-02-15 16:17:27 -05:00

18 lines
523 B
Docker

# Cloudflare Containers build: compile a small, portable Rust HTTP server.
# This container only serves the bootstrap /api/* endpoints used for WebRTC rendezvous.
FROM rust:1.86-bookworm AS build
WORKDIR /app
# Pre-copy manifest to prime dependency caching.
COPY Cargo.toml /app/Cargo.toml
COPY src /app/src
RUN cargo build --release
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=build /app/target/release/ec-cf-bootstrap-api /app/ec-cf-bootstrap-api
ENV RUST_LOG=info
EXPOSE 8080
CMD ["/app/ec-cf-bootstrap-api"]