Files
ohrwurm/Dockerfile
Johannes Heuel a3e9175ea8
Some checks failed
tests / test (push) Failing after 1m55s
tests / pre-commit (push) Failing after 3m33s
tests / fmt (push) Successful in 7m33s
tests / build (push) Successful in 8m15s
tests / clippy (push) Successful in 8m19s
deploy / release-image (push) Successful in 11m24s
remove ffmpeg
2024-11-27 13:30:29 +01:00

29 lines
627 B
Docker

# Build image
FROM rust:slim-bullseye 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
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"]