Add Dockerfile

This commit is contained in:
Le fishe au chocolat 2026-06-07 11:14:44 +00:00
parent 7ebcdf28d2
commit 704372d29a

34
Dockerfile Normal file
View file

@ -0,0 +1,34 @@
# Build
FROM rust:1.75-slim AS builder
# Dependencies
RUN apt-get update && apt-get install -y \
cmake \
nasm \
clang \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
# Compile for prod
RUN cargo build --release --bin scrape
# Lightweight image
FROM debian:bookworm-slim
# Runtime libs
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy binary to bin folder
COPY --from=builder /app/target/release/scrape /usr/local/bin/scrape
# Run scraping
CMD ["scrape"]