ai-code-battle/bots/rusher/Dockerfile
jedarden 04cf11be83 fix(bots): use thin LTO and Cargo.lock in rusher build
- Switch from full LTO (lto=true) to thin LTO to avoid memory/ICE issues
- Include Cargo.lock in Dockerfile for reproducible dependency resolution
- Use opt-level='s' (balanced size/speed) instead of 'z' (max size opt)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 07:39:16 -04:00

21 lines
320 B
Docker

# Build stage
FROM rust:1.85-alpine AS builder
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release
# Runtime stage
FROM alpine:3.21
WORKDIR /app
COPY --from=builder /app/target/release/rusher-bot /app/rusher-bot
ENV BOT_PORT=8082
ENV BOT_SECRET=""
EXPOSE 8082
CMD ["./rusher-bot"]