2021-08-11 16:41:42 +08:00
|
|
|
FROM node:lts-alpine AS builder-web
|
|
|
|
ADD gui /build/gui
|
|
|
|
WORKDIR /build/gui
|
|
|
|
RUN echo "network-timeout 600000" >> .yarnrc
|
|
|
|
#RUN yarn config set registry https://registry.npm.taobao.org
|
|
|
|
#RUN yarn config set sass_binary_site https://cdn.npm.taobao.org/dist/node-sass -g
|
|
|
|
RUN yarn cache clean && yarn && yarn build
|
|
|
|
|
|
|
|
FROM golang:alpine AS builder
|
|
|
|
ADD service /build/service
|
|
|
|
WORKDIR /build/service
|
|
|
|
ENV GO111MODULE=on
|
|
|
|
ENV GOPROXY=https://goproxy.io
|
2021-08-11 16:51:54 +08:00
|
|
|
COPY --from=builder-web /build/web server/router/web
|
2021-08-11 16:41:42 +08:00
|
|
|
RUN go mod tidy && CGO_ENABLED=0 go build -ldflags="-X github.com/v2rayA/v2rayA/global.Version=unstable -s -w" -o v2raya .
|
|
|
|
|
|
|
|
FROM v2fly/v2fly-core
|
|
|
|
COPY --from=builder /build/service/v2raya /usr/bin/
|
|
|
|
RUN wget -O /usr/local/share/v2ray/LoyalsoldierSite.dat https://raw.githubusercontent.com/mzz2017/dist-v2ray-rules-dat/master/geosite.dat
|
|
|
|
RUN apk add --no-cache iptables ip6tables
|
|
|
|
EXPOSE 2017
|
|
|
|
VOLUME /etc/v2raya
|
|
|
|
ENTRYPOINT ["v2raya"]
|
|
|
|
|