Files
ohrwurm/Dockerfile
Johannes Heuel 79fc59c2a1
All checks were successful
continuous-integration/drone/push Build is passing
add cashing of rust dependencies
2024-06-05 20:26:20 +02:00

27 lines
558 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 .
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN cargo build --release --locked
# Build
COPY . .
RUN cargo build --release --locked
# Release image
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y python3-pip ffmpeg
RUN pip install -U yt-dlp
COPY --from=build /app/target/release/ohrwurm .
CMD ["./ohrwurm"]