# SPDX-License-Identifier: AGPL-3.0-or-later
# Build context = repo root:  docker build -t pvtcoms-demo -f demo/Dockerfile .
# Runs the pvtcoms LAN demo (TCP). For testing the post-quantum handshake between two containers.
FROM rust:1.96-slim AS build
WORKDIR /app
COPY rust-toolchain.toml Cargo.toml Cargo.lock ./
COPY core ./core
COPY demo ./demo
RUN cargo build --release -p pvtcoms-demo

FROM debian:bookworm-slim
COPY --from=build /app/target/release/pvtcoms-demo /usr/local/bin/pvtcoms-demo
ENTRYPOINT ["pvtcoms-demo"]
