workflow: fix goreleaser config and containerfile

This commit is contained in:
2025-10-15 17:17:52 +11:00
parent 23d7e1d4f9
commit 18a89ea11a
22 changed files with 57 additions and 44 deletions

15
Containerfile Executable file
View File

@@ -0,0 +1,15 @@
FROM golang:1.23 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"]