Files
sub2sing-box/Containerfile
nite b63662347a fix: go.mod sing dependency
workflow: upgrade go 1.23 to 1.25 in Containerfile
2025-10-15 18:41:24 +11:00

16 lines
408 B
Docker
Executable File

FROM golang:1.25 as builder
LABEL authors="nite07"
WORKDIR /app
COPY . .
RUN go mod download
ARG version
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/bestnite/sub2sing-box/constant.Version=${version}" -o sub2sing-box .
WORKDIR /app
FROM alpine:latest
COPY --from=builder /app/sub2sing-box /app/sub2sing-box
VOLUME [ "/app/templates" ]
EXPOSE 8080
CMD ["/app/sub2sing-box", "server"]