2020-02-28 20:56:17 +08:00
|
|
|
FROM mzz2017/git:alpine AS version
|
|
|
|
WORKDIR /build
|
|
|
|
ADD .git ./.git
|
2021-09-06 18:59:48 +08:00
|
|
|
RUN git describe --abbrev=0 --tags | tee ./version
|
2020-02-28 20:56:17 +08:00
|
|
|
|
|
|
|
|
2020-08-20 07:20:45 +08:00
|
|
|
FROM node:lts-alpine AS builder-web
|
|
|
|
ADD gui /build/gui
|
|
|
|
WORKDIR /build/gui
|
2020-10-15 23:55:28 +08:00
|
|
|
RUN echo "network-timeout 600000" >> .yarnrc
|
2020-10-15 23:40:52 +08:00
|
|
|
#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
|
2023-08-02 23:54:07 +08:00
|
|
|
RUN yarn cache clean && yarn && yarn build
|
2020-08-20 07:20:45 +08:00
|
|
|
|
2021-08-09 23:34:20 +08:00
|
|
|
FROM golang:alpine AS builder
|
|
|
|
ADD service /build/service
|
|
|
|
WORKDIR /build/service
|
|
|
|
COPY --from=version /build/version ./
|
2021-08-11 16:51:54 +08:00
|
|
|
COPY --from=builder-web /build/web server/router/web
|
2021-09-02 19:28:02 +08:00
|
|
|
RUN export VERSION=$(cat ./version) && CGO_ENABLED=0 go build -ldflags="-X github.com/v2rayA/v2rayA/conf.Version=${VERSION:1} -s -w" -o v2raya .
|
2021-08-09 23:34:20 +08:00
|
|
|
|
2021-04-27 15:37:58 +08:00
|
|
|
FROM v2fly/v2fly-core
|
2020-05-12 13:10:56 +08:00
|
|
|
COPY --from=builder /build/service/v2raya /usr/bin/
|
2020-10-30 16:57:39 +08:00
|
|
|
RUN wget -O /usr/local/share/v2ray/LoyalsoldierSite.dat https://raw.githubusercontent.com/mzz2017/dist-v2ray-rules-dat/master/geosite.dat
|
2023-11-24 11:29:39 +08:00
|
|
|
RUN apk add --no-cache iptables ip6tables tzdata
|
2019-11-26 08:58:24 +08:00
|
|
|
EXPOSE 2017
|
2020-10-15 23:05:51 +08:00
|
|
|
VOLUME /etc/v2raya
|
2021-08-09 23:34:20 +08:00
|
|
|
ENTRYPOINT ["v2raya"]
|