From e7997f9896688f002b7f49519b83b76aacf76642 Mon Sep 17 00:00:00 2001 From: rebecca554owen Date: Sun, 17 Dec 2023 14:01:08 +0800 Subject: [PATCH] Create Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b70b881 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Build go +FROM golang:1.21.4-alpine AS builder +WORKDIR /app +COPY . . +ENV CGO_ENABLED=0 +RUN go mod download +RUN go build -v -o V2bX -tags "sing xray with_reality_server with_quic with_grpc with_utls with_wireguard with_acme" + +# Release +FROM alpine +# 安装必要的工具包 +RUN apk --update --no-cache add tzdata ca-certificates \ + && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime +RUN mkdir /etc/V2bX/ +COPY --from=builder /app/V2bX /usr/local/bin + +ENTRYPOINT [ "V2bX", "--config", "/etc/V2bX/config.json"]