ai-code-battle/starters/rust/Dockerfile
jedarden b60b103c0f fix(starter-rust): fix compilation errors in Rust starter kit
- Add Clone derive to AppState for axum compatibility
- Import Digest trait from sha2 for hash computation
- Use String instead of &str in response headers for lifetime safety
- Add Position import to grid.rs module
- Make Position Copy for easier cloning
- Replace constant_time_eq with custom hmac_equal function
- Add musl-dev to Dockerfile for Alpine build compatibility

The Rust starter kit now compiles and builds successfully with
cargo check and Docker, matching the requirements from plan §5.3
and §12 (Phase 2).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 10:18:11 -04:00

19 lines
301 B
Docker

FROM rust:1.85-alpine AS builder
WORKDIR /app
COPY Cargo.toml ./
COPY src ./src
RUN apk add --no-cache musl-dev && cargo build --release
FROM alpine:3.21
WORKDIR /app
COPY --from=builder /app/target/release/acb-starter-bot /app/bot
ENV BOT_PORT=8080
ENV BOT_SECRET=""
EXPOSE 8080
CMD ["./bot"]