Files
my-website-v2/backend/task/Dockerfile

30 lines
538 B
Docker
Raw Permalink Normal View History

# Build stage
FROM rust:1.88.0 AS builder
WORKDIR /app
2025-07-19 14:00:47 -04:00
COPY ./task ./task
COPY ./cache ./cache
COPY ./storage ./storage
RUN cargo build --release --manifest-path ./task/Cargo.toml
# Runtime stage
FROM debian:bookworm-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /app/posts
COPY --from=builder /app/task/target/release/task /app/task
COPY --from=builder /app/cache ./cache
COPY --from=builder /app/storage ./storage
EXPOSE 3000
CMD ["/app/task"]