Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

我提供了类似 xray 的 docker-compose 部署方式 #22

@hexonal

Description

@hexonal
# Build go
FROM golang:1.21-alpine AS builder
WORKDIR /app
ENV CGO_ENABLED=0
ENV version=v3.0.0
RUN  apk --update --no-cache add tzdata ca-certificates git
RUN  git clone https://github.com/InazumaV/V2bX.git . &&git checkout v3.0.0 && \
     go build -v -o V2bX -tags "sing xray with_reality_server with_quic" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="


# Release
FROM  alpine
# 安装必要的工具包
RUN  apk --update --no-cache add tzdata ca-certificates git \
    && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN mkdir /etc/V2bX
COPY --from=builder /app/V2bX /usr/local/bin
COPY --from=builder /app/example /etc/V2bX
RUN  mv /etc/V2bX/config.json /etc/V2bX/config.json

ENTRYPOINT [ "V2bX", "server"]
~                               

提供的 yml

version: '3.8'
services:
  xrayr:
    build:
      context: ./
      dockerfile: Dockerfile
    volumes:
      - ./config:/etc/V2bX # 映射配置文件夹
    restart: always
    network_mode: host

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions