Files
ohrwurm/Dockerfile
Renovate Bot f2dc1a6616
Some checks failed
tests / fmt (push) Successful in 1m40s
tests / pre-commit (push) Successful in 1m58s
tests / clippy (push) Failing after 2m26s
tests / build (push) Successful in 2m40s
tests / test (push) Successful in 2m42s
Update debian:bullseye-slim Docker digest to 7aafeb2
2025-04-09 00:01:04 +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: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"]