Working on play command, unable to get source to work

This commit is contained in:
2023-07-05 16:44:14 -04:00
parent d54b8d3823
commit 6f66564377
6 changed files with 192 additions and 367 deletions

View File

@@ -1,10 +1,20 @@
FROM rust:1.67 as builder
RUN apt-get update && apt-get install -y cmake && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/siren
WORKDIR /siren
RUN apt-get update && apt-get install -y cmake && apt-get auto-remove -y
COPY . .
RUN cargo install --path .
RUN cargo build --release --bin siren
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y libopus-dev ffmpeg youtube-dl && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/siren /usr/local/bin/siren
CMD ["siren"]
FROM debian:bullseye-slim as packages
WORKDIR /packages
RUN apt-get update && apt-get install -y curl tar xz-utils
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux > yt-dlp && \
chmod +x yt-dlp
RUN curl -L https://github.com/yt-dlp/FFmpeg-Builds/releases/latest/download/ffmpeg-master-latest-linux64-gpl.tar.xz > ffmpeg.tar.xz && \
tar -xJf ffmpeg.tar.xz --wildcards */bin/ffmpeg --transform='s/^.*\///' && rm ffmpeg.tar.xz
FROM debian:bullseye-slim as runtime
WORKDIR /siren
RUN apt-get update && apt-get install -y libopus-dev ffmpeg youtube-dl
COPY --from=builder /siren/target/release/siren siren
COPY --from=packages /packages /usr/bin
CMD ["./siren"]