# Build image FROM rust:slim-bullseye@sha256:f635d98d781930be4ab1a5135fd8e2f7b2bdf43c741c99e420d794d0777ead4d as build RUN apt-get update && apt-get install -y \ build-essential autoconf automake cmake libtool libssl-dev pkg-config WORKDIR "/app" # Cache dependencies COPY Cargo.toml Cargo.lock . RUN mkdir src \ && echo 'fn main() { panic!("Dummy function called!"); }' > ./src/main.rs RUN cargo build --release --locked # Build COPY . . RUN touch src/main.rs RUN cargo build --release --locked # Release image FROM debian:bullseye-slim@sha256:e4b93db6aad977a95aa103917f3de8a2b16ead91cf255c3ccdb300c5d20f3015 RUN apt-get update && apt-get install -y python3-pip RUN pip install -U yt-dlp COPY --from=build /app/target/release/ohrwurm . CMD ["./ohrwurm"]