2024-10-09 01:41:27 -04:00
|
|
|
FROM golang:1.23 as builder
|
2024-03-12 12:11:34 -04:00
|
|
|
LABEL authors="nite07"
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN go mod download
|
|
|
|
ARG version
|
2024-10-21 03:39:49 -04:00
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/nitezs/sub2sing-box/constant.Version=${version}" -o sub2sing-box .
|
2024-03-18 10:32:33 -04:00
|
|
|
WORKDIR /app
|
|
|
|
|
2024-03-12 12:11:34 -04:00
|
|
|
FROM alpine:latest
|
|
|
|
COPY --from=builder /app/sub2sing-box /app/sub2sing-box
|
2024-03-18 10:32:33 -04:00
|
|
|
VOLUME [ "/app/templates" ]
|
|
|
|
EXPOSE 8080
|
2024-10-21 03:39:49 -04:00
|
|
|
CMD ["/app/sub2sing-box", "server"]
|