From 83bb03be72e6ead42d6f5b997434590d3dfe0bcd Mon Sep 17 00:00:00 2001 From: langhuihui <178529795@qq.com> Date: Fri, 16 May 2025 11:45:37 +0800 Subject: [PATCH] feat: add ffmpeg to docker --- .github/workflows/go.yml | 10 ++++++++-- Dockerfile | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 77dfc45..9926318 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -83,7 +83,10 @@ jobs: - name: docker build amd64 if: success() && startsWith(github.ref, 'refs/tags/') run: | - rm -f m7s monibuca_linux # Clean up any previous state + rm -f m7s monibuca_linux ffmpeg admin.zip # Clean up any previous state + curl -L https://download.m7s.live/bin/ffmpeg-x86_64-linux -o ffmpeg + curl -L https://download.m7s.live/bin/admin.zip -o admin.zip + chmod +x ffmpeg tar -zxvf bin/m7s_v5_linux_amd64.tar.gz mv m7s monibuca_linux docker login -u langhuihui -p ${{ secrets.DOCKER_PASSWORD }} @@ -91,7 +94,10 @@ jobs: - name: docker build arm64 if: success() && startsWith(github.ref, 'refs/tags/') run: | - rm -f m7s monibuca_linux # Clean up from amd64 build + rm -f m7s monibuca_linux ffmpeg admin.zip # Clean up from amd64 build + curl -L https://download.m7s.live/bin/ffmpeg-aarch64-linux -o ffmpeg + curl -L https://download.m7s.live/bin/admin.zip -o admin.zip + chmod +x ffmpeg tar -zxvf bin/m7s_v5_linux_arm64.tar.gz mv m7s monibuca_linux # Dockerfile expects this name docker login -u langhuihui -p ${{ secrets.DOCKER_PASSWORD }} # Repeated login for consistency diff --git a/Dockerfile b/Dockerfile index 31e59ea..dd43431 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ WORKDIR /monibuca # Copy the pre-compiled binary from the build context # The GitHub Actions workflow prepares 'monibuca_linux' in the context root COPY monibuca_linux ./monibuca_linux +COPY ffmpeg /usr/local/bin/ffmpeg +COPY admin.zip ./admin.zip # Copy the configuration file from the build context COPY example/default/config.yaml /etc/monibuca/config.yaml