forked from jontze/cadency-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (22 loc) · 972 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM lukemathwalker/cargo-chef:latest-rust-1.62 as planner
WORKDIR /cadency
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM lukemathwalker/cargo-chef:latest-rust-1.62 as cacher
WORKDIR /cadency
COPY --from=planner /cadency/recipe.json recipe.json
RUN apt-get update && apt-get install -y cmake
RUN cargo chef cook --release --recipe-path recipe.json
FROM lukemathwalker/cargo-chef:latest-rust-1.62 as builder
WORKDIR /cadency
COPY . .
COPY --from=cacher /cadency/target target
COPY --from=cacher $CARGO_HOME $CARGO_HOME
RUN cargo build --release --bin cadency
FROM debian:bullseye-slim
LABEL org.opencontainers.image.source="https://github.com/jontze/cadency-rs"
WORKDIR /cadency
COPY --from=builder /cadency/target/release/cadency cadency
RUN apt-get update && apt-get install -y libopus-dev ffmpeg wget python3
RUN wget https://github.com/yt-dlp/yt-dlp/releases/download/2022.09.01/yt-dlp && chmod +x yt-dlp && mv yt-dlp /usr/bin
CMD [ "./cadency" ]