Files
ohrwurm/Dockerfile
Renovate Bot 175de4ade9
Some checks failed
tests / fmt (push) Successful in 1m32s
tests / build (push) Successful in 1m30s
tests / clippy (push) Failing after 1m28s
tests / test (push) Successful in 1m33s
tests / pre-commit (push) Successful in 2m24s
Update debian:bullseye-slim Docker digest to fdd7556
2025-04-30 00:00:53 +00:00

29 lines
771 B
Docker

# 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:fdd75562fdcde1039c2480a1ea1cd2cf03b18b6e4cb551cabb03bde66ade8a5d
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"]