rust:1.85-alpine does not include musl-dev, causing the gcc linker to fail with "cannot find crti.o". Required for serde_derive and other proc-macro crates to compile. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
351 B
Docker
21 lines
351 B
Docker
# Build stage
|
|
FROM rust:1.85-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src ./src
|
|
|
|
RUN apk add --no-cache musl-dev && 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"]
|