完善项目

This commit is contained in:
user123456
2025-06-11 17:52:19 +08:00
parent b2ebcf244a
commit c1ba893a9d
10 changed files with 496 additions and 143 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM golang:1.24-alpine AS builder
WORKDIR /app
COPY src/go.mod src/go.sum ./
RUN go mod download
COPY src/ .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -trimpath -o hubproxy .
FROM alpine
WORKDIR /root/
# 安装skopeo
RUN apk add --no-cache skopeo && mkdir -p temp && chmod 700 temp
COPY --from=builder /app/hubproxy .
COPY --from=builder /app/src/config.toml .
COPY --from=builder /app/src/public ./public
CMD ["./hubproxy"]