# Build image FROM rust:slim-bullseye@sha256:1eca9af45f393ac4669b9b63659529638359575f6268cbd4e6543ddc46c53803 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:7aafeb23eaef5d5b1de26e967b9a78f018baaac81dd75246b99781eaaa2d59ef 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"]