Spaces:
Paused
Paused
justincnn commited on
Commit ·
b9e6e15
1
Parent(s): d3b54a1
fix: add Node.js 24 support and fix Docker build
Browse files- Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true to workflow env
- Add git and ca-certificates to builder stage for dependency resolution
- Add ca-certificates to final stage for HTTPS support
- .github/workflows/docker-build.yml +1 -0
- Dockerfile +6 -0
.github/workflows/docker-build.yml
CHANGED
|
@@ -14,6 +14,7 @@ on:
|
|
| 14 |
|
| 15 |
env:
|
| 16 |
DOCKER_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/zai-proxy
|
|
|
|
| 17 |
|
| 18 |
jobs:
|
| 19 |
build:
|
|
|
|
| 14 |
|
| 15 |
env:
|
| 16 |
DOCKER_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/zai-proxy
|
| 17 |
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
| 18 |
|
| 19 |
jobs:
|
| 20 |
build:
|
Dockerfile
CHANGED
|
@@ -2,6 +2,9 @@ FROM golang:1.23-alpine AS builder
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY go.mod go.sum ./
|
| 6 |
RUN go mod download
|
| 7 |
|
|
@@ -12,6 +15,9 @@ FROM alpine:latest
|
|
| 12 |
|
| 13 |
WORKDIR /app
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
COPY --from=builder /app/zai-proxy .
|
| 16 |
|
| 17 |
# proxies.txt 可通过 docker run -v ./proxies.txt:/app/proxies.txt 挂载
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# 安装 git 和 ca-certificates,某些依赖可能需要
|
| 6 |
+
RUN apk add --no-cache git ca-certificates
|
| 7 |
+
|
| 8 |
COPY go.mod go.sum ./
|
| 9 |
RUN go mod download
|
| 10 |
|
|
|
|
| 15 |
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
+
# 安装 ca-certificates 以支持 HTTPS
|
| 19 |
+
RUN apk add --no-cache ca-certificates
|
| 20 |
+
|
| 21 |
COPY --from=builder /app/zai-proxy .
|
| 22 |
|
| 23 |
# proxies.txt 可通过 docker run -v ./proxies.txt:/app/proxies.txt 挂载
|