代码拉取完成,页面将自动刷新
同步操作将从 guanty18/CoGPT 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
FROM --platform=$BUILDPLATFORM golang:alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ENV CGO_ENABLED=0 GOOS=linux
WORKDIR /app
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
--mount=type=cache,target=/go/pkg,sharing=locked \
apk add --update-cache ca-certificates tzdata make && \
go mod download && \
\
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
make cogpt-api args1="GOARCH=amd64" args="-o cogpt-api"; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
make cogpt-api args1="GOARCH=arm64" args="-o cogpt-api"; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
make cogpt-api args1="GOARCH=arm" args="-o cogpt-api"; \
else \
echo "Unsupported platform: $TARGETPLATFORM"; \
exit 1; \
fi
FROM scratch
WORKDIR /app
COPY --from=builder /app/cogpt-api /app/cogpt-api
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
EXPOSE 8080
VOLUME ["/app/db", "/app/log"]
ENTRYPOINT ["./cogpt-api"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。