neitxj / Dockerfile
hmtxj's picture
Update Dockerfile
b98578f verified
raw
history blame contribute delete
283 Bytes
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o new-api .
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/new-api .
COPY --from=builder /app/web ./web
# HF Spaces 使用 7860 端口
ENV PORT=7860
EXPOSE 7860
CMD ["./new-api", "--port", "7860"]