interactive intro to open social
at main 775 B view raw
1# Build stage 2FROM rustlang/rust:nightly-slim AS builder 3 4# Install build dependencies 5RUN apt-get update && apt-get install -y \ 6 pkg-config \ 7 libssl-dev \ 8 && rm -rf /var/lib/apt/lists/* 9 10WORKDIR /app 11 12# Copy manifests 13COPY Cargo.toml Cargo.lock ./ 14 15# Copy source code 16COPY src ./src 17COPY static ./static 18 19# Build for release 20RUN cargo build --release 21 22# Runtime stage 23FROM debian:bookworm-slim 24 25# Install runtime dependencies 26RUN apt-get update && apt-get install -y \ 27 ca-certificates \ 28 libssl3 \ 29 && rm -rf /var/lib/apt/lists/* 30 31WORKDIR /app 32 33# Copy the built binary 34COPY --from=builder /app/target/release/at-me /app/at-me 35 36# Copy static files 37COPY --from=builder /app/static /app/static 38 39# Expose port 40EXPOSE 8080 41 42# Run the binary 43CMD ["./at-me"]