From 2d68a4171d8b7007d95a9dea104a8bd6d819b336 Mon Sep 17 00:00:00 2001 From: lmk <1095689763@qq.com> Date: Mon, 22 Jun 2026 13:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9D=E8=B5=96=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile.ffmpeg | 39 ----------------------------------- Dockerfile.hyperframes | 44 --------------------------------------- Dockerfile.scenedetect | 47 ------------------------------------------ 3 files changed, 130 deletions(-) delete mode 100644 Dockerfile.ffmpeg delete mode 100644 Dockerfile.hyperframes delete mode 100644 Dockerfile.scenedetect diff --git a/Dockerfile.ffmpeg b/Dockerfile.ffmpeg deleted file mode 100644 index 2e99e5f..0000000 --- a/Dockerfile.ffmpeg +++ /dev/null @@ -1,39 +0,0 @@ -# 阶段1: 构建 -FROM golang:alpine AS builder - -RUN apk add --no-cache git ca-certificates tzdata - -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -ENV GO111MODULE=on -ENV GOPROXY=https://goproxy.cn,direct -ENV CGO_ENABLED=0 -ENV GOTOOLCHAIN=auto -WORKDIR /build - -COPY . . - -RUN go mod download && go mod tidy - -RUN go build -ldflags="-s -w" -o main ./main.go - - -# 阶段2: 运行时(预装 FFmpeg) -FROM alpine:3.19 - -RUN apk add --no-cache ca-certificates tzdata ffmpeg - -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -WORKDIR /app - -# 复制二进制和运行时必需的文件 -COPY --from=builder /build/main . -COPY --from=builder /build/config.yml . -COPY --from=builder /build/scripts ./scripts - -EXPOSE 3010 - -CMD ["./main"] diff --git a/Dockerfile.hyperframes b/Dockerfile.hyperframes deleted file mode 100644 index 92c362a..0000000 --- a/Dockerfile.hyperframes +++ /dev/null @@ -1,44 +0,0 @@ -# 阶段1: 构建 -FROM golang:alpine AS builder - -RUN apk add --no-cache git ca-certificates tzdata - -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -ENV GO111MODULE=on -ENV GOPROXY=https://goproxy.cn,direct -ENV CGO_ENABLED=0 -ENV GOTOOLCHAIN=auto -WORKDIR /build - -COPY . . - -RUN go mod download && go mod tidy - -RUN go build -ldflags="-s -w" -o main ./main.go - - -# 阶段2: 运行时(预装 FFmpeg + Node.js + HyperFrames) -FROM alpine:3.19 - -# nodejs/npm 在 community 仓库,需启用 -RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.19/community" >> /etc/apk/repositories \ - && apk add --no-cache ca-certificates tzdata ffmpeg nodejs npm - -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# 预装 HyperFrames(全局安装) -RUN npm install -g hyperframes - -WORKDIR /app - -# 复制二进制和运行时必需的文件 -COPY --from=builder /build/main . -COPY --from=builder /build/config.yml . -COPY --from=builder /build/scripts ./scripts - -EXPOSE 3010 - -CMD ["./main"] diff --git a/Dockerfile.scenedetect b/Dockerfile.scenedetect deleted file mode 100644 index 04fb078..0000000 --- a/Dockerfile.scenedetect +++ /dev/null @@ -1,47 +0,0 @@ -# 阶段1: 构建 -FROM golang:alpine AS builder - -RUN apk add --no-cache git ca-certificates tzdata - -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -ENV GO111MODULE=on -ENV GOPROXY=https://goproxy.cn,direct -ENV CGO_ENABLED=0 -ENV GOTOOLCHAIN=auto -WORKDIR /build - -COPY . . - -RUN go mod download && go mod tidy - -RUN go build -ldflags="-s -w" -o main ./main.go - - -# 阶段2: 运行时(预装 FFmpeg + Python3 + PySceneDetect) -FROM alpine:3.19 - -RUN apk add --no-cache ca-certificates tzdata ffmpeg python3 py3-pip \ - gcc musl-dev python3-dev linux-headers - -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# 预装 PySceneDetect(opencv-headless 无需 GUI 依赖) -# 使用 --break-system-packages 兼容 PEP 668 限制的 pip 版本 -RUN pip3 install --break-system-packages scenedetect[opencv-headless,ffmpeg] - -# 验证安装 -RUN python3 -c "import scenedetect; print(f'scenedetect {scenedetect.__version__} installed')" - -WORKDIR /app - -# 复制二进制和运行时必需的文件 -COPY --from=builder /build/main . -COPY --from=builder /build/config.yml . -COPY --from=builder /build/scripts ./scripts - -EXPOSE 3010 - -CMD ["./main"]