mirror of
https://github.com/v0l/route96.git
synced 2025-06-22 05:32:50 +00:00
chore: use rust-ffmpeg docker as base for build
This commit is contained in:
@ -5,5 +5,7 @@ Dockerfile
|
|||||||
docker-compose.yml
|
docker-compose.yml
|
||||||
.dockerignore
|
.dockerignore
|
||||||
.gitignore
|
.gitignore
|
||||||
ui_src/.node_modules
|
|
||||||
docs/
|
docs/
|
||||||
|
**/dist
|
||||||
|
**/node_modules
|
39
Dockerfile
39
Dockerfile
@ -1,40 +1,9 @@
|
|||||||
ARG IMAGE=rust:bookworm
|
ARG IMAGE=rust:bookworm
|
||||||
ARG FEATURES
|
ARG FEATURES
|
||||||
|
|
||||||
FROM $IMAGE AS build
|
FROM voidic/rust-ffmpeg AS build
|
||||||
WORKDIR /app/src
|
WORKDIR /src
|
||||||
COPY src src
|
COPY . .
|
||||||
COPY migrations migrations
|
|
||||||
COPY Cargo.lock Cargo.lock
|
|
||||||
COPY Cargo.toml Cargo.toml
|
|
||||||
ENV FFMPEG_DIR=/app/ffmpeg
|
|
||||||
RUN apt update && \
|
|
||||||
apt install -y \
|
|
||||||
build-essential \
|
|
||||||
libx264-dev \
|
|
||||||
libx265-dev \
|
|
||||||
libwebp-dev \
|
|
||||||
libvpx-dev \
|
|
||||||
nasm \
|
|
||||||
libclang-dev \
|
|
||||||
protobuf-compiler && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
RUN git clone --single-branch --branch release/7.1 https://git.v0l.io/ffmpeg/FFmpeg.git && \
|
|
||||||
cd FFmpeg && \
|
|
||||||
./configure \
|
|
||||||
--prefix=${FFMPEG_DIR} \
|
|
||||||
--disable-programs \
|
|
||||||
--disable-doc \
|
|
||||||
--disable-network \
|
|
||||||
--enable-gpl \
|
|
||||||
--enable-libx264 \
|
|
||||||
--enable-libx265 \
|
|
||||||
--enable-libwebp \
|
|
||||||
--enable-libvpx \
|
|
||||||
--disable-static \
|
|
||||||
--disable-postproc \
|
|
||||||
--enable-shared && \
|
|
||||||
make -j$(nproc) install
|
|
||||||
RUN cargo install --path . --root /app/build --features "${FEATURES}"
|
RUN cargo install --path . --root /app/build --features "${FEATURES}"
|
||||||
|
|
||||||
FROM node:bookworm AS ui_builder
|
FROM node:bookworm AS ui_builder
|
||||||
@ -52,6 +21,6 @@ RUN apt update && \
|
|||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
COPY --from=build /app/build .
|
COPY --from=build /app/build .
|
||||||
COPY --from=ui_builder /app/src/dist ui
|
COPY --from=ui_builder /app/src/dist ui
|
||||||
COPY --from=build /app/ffmpeg/lib/ /lib
|
COPY --from=build /app/src/ffmpeg/lib/ /lib
|
||||||
RUN ./bin/route96 --version
|
RUN ./bin/route96 --version
|
||||||
ENTRYPOINT ["./bin/route96"]
|
ENTRYPOINT ["./bin/route96"]
|
Reference in New Issue
Block a user