-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·43 lines (41 loc) · 1.06 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ARG IMAGE=rust:bookworm
FROM $IMAGE AS build
WORKDIR /app/src
ENV FFMPEG_DIR=/app/ffmpeg
COPY . .
RUN apt update && \
apt install -y \
build-essential \
libx264-dev \
libx265-dev \
libwebp-dev \
libpng-dev \
nasm \
protobuf-compiler \
libclang-dev && \
rm -rf /var/lib/apt/lists/*
RUN git clone --single-branch --branch release/7.1 https://git.ffmpeg.org/ffmpeg.git && \
cd ffmpeg && \
./configure \
--prefix=$FFMPEG_DIR \
--disable-programs \
--disable-doc \
--disable-network \
--enable-gpl \
--enable-version3 \
--disable-postproc \
--enable-libx264 \
--enable-libx265 \
--enable-libwebp \
--disable-static \
--enable-shared && \
make -j$(nproc) && make install
RUN cargo install --path . --bin zap-stream-core --root /app/build --features zap-stream
FROM $IMAGE AS runner
WORKDIR /app
RUN apt update && \
apt install -y libx264-164 && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /app/build .
COPY --from=build /app/ffmpeg/lib/ /lib
ENTRYPOINT ["/app/bin/zap-stream-core"]