This commit is contained in:
2026-07-03 11:52:57 +08:00
parent 8c5f83630c
commit 72bc6b89e1
2 changed files with 25 additions and 13 deletions
+2 -13
View File
@@ -2,24 +2,13 @@ services:
video-factory:
build:
dockerfile_inline: |
FROM golang:alpine AS builder
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add --no-cache git ca-certificates tzdata
ENV TZ=Asia/Shanghai
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct
ENV CGO_ENABLED=0
ENV GOTOOLCHAIN=auto
FROM video-factory-builder:base AS builder
WORKDIR /build
COPY . .
RUN go mod download && go mod tidy
RUN go build -ldflags="-s -w" -o main ./main.go
FROM alpine:3.19
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& 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
FROM video-factory-runtime:base
WORKDIR /app
COPY --from=builder /build/config.yml .
COPY --from=builder /build/prompt.md .