mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 09:58:14 -05:00
18 lines
538 B
Docker
18 lines
538 B
Docker
# Build go
|
|
FROM golang:1.23.2-alpine AS builder
|
|
WORKDIR /app
|
|
COPY . .
|
|
ENV CGO_ENABLED=0
|
|
RUN go mod download
|
|
RUN go build -v -o V2bX -tags "sing xray hysteria2 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", "server", "--config", "/etc/V2bX/config.json"]
|