mirror of
https://github.com/Xinrea/bili-shadowreplay.git
synced 2025-11-24 20:15:34 +08:00
ci/cd: update docker script
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -48,12 +48,6 @@ COPY src-tauri/crates ./src-tauri/crates
|
|||||||
WORKDIR /app/src-tauri
|
WORKDIR /app/src-tauri
|
||||||
RUN rustup component add rustfmt
|
RUN rustup component add rustfmt
|
||||||
RUN cargo build --no-default-features --features headless --release
|
RUN cargo build --no-default-features --features headless --release
|
||||||
# Download and install FFmpeg static build
|
|
||||||
RUN wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz \
|
|
||||||
&& tar xf ffmpeg-release-amd64-static.tar.xz \
|
|
||||||
&& mv ffmpeg-*-static/ffmpeg ./ \
|
|
||||||
&& mv ffmpeg-*-static/ffprobe ./ \
|
|
||||||
&& rm -rf ffmpeg-*-static ffmpeg-release-amd64-static.tar.xz
|
|
||||||
|
|
||||||
# Final stage
|
# Final stage
|
||||||
FROM debian:trixie-slim AS final
|
FROM debian:trixie-slim AS final
|
||||||
@@ -67,13 +61,13 @@ RUN apt-get update && apt-get install -y \
|
|||||||
fonts-wqy-microhei \
|
fonts-wqy-microhei \
|
||||||
netbase \
|
netbase \
|
||||||
nscd \
|
nscd \
|
||||||
|
ffmpeg \
|
||||||
&& update-ca-certificates \
|
&& update-ca-certificates \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
RUN touch /etc/netgroup
|
RUN touch /etc/netgroup
|
||||||
RUN mkdir -p /var/run/nscd && chmod 755 /var/run/nscd
|
RUN mkdir -p /var/run/nscd && chmod 755 /var/run/nscd
|
||||||
RUN nscd
|
|
||||||
|
|
||||||
# Add /app to PATH
|
# Add /app to PATH
|
||||||
ENV PATH="/app:${PATH}"
|
ENV PATH="/app:${PATH}"
|
||||||
@@ -83,8 +77,6 @@ COPY --from=frontend-builder /app/dist ./dist
|
|||||||
|
|
||||||
# Copy built Rust binary
|
# Copy built Rust binary
|
||||||
COPY --from=rust-builder /app/src-tauri/target/release/bili-shadowreplay .
|
COPY --from=rust-builder /app/src-tauri/target/release/bili-shadowreplay .
|
||||||
COPY --from=rust-builder /app/src-tauri/ffmpeg ./ffmpeg
|
|
||||||
COPY --from=rust-builder /app/src-tauri/ffprobe ./ffprobe
|
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|||||||
Reference in New Issue
Block a user