mirror of
https://github.com/v2rayA/v2rayA.git
synced 2024-11-25 16:20:03 +08:00
1c486b40cc
* Temporary test * Push containers to ghcr.io via GitHub Actions * replace tabs with spaces * temporary comment out dockerhub * temporary comment out dockerhub for gui * revertme: remove non-ghcr docker image tags * convert repo owner name to lowercase * fix conversion to lowercase * fix typo, move lowercase conversion to calculate sooner * copy lowercase conversion to both jobs * fix typo * add labels to gui and dev Dockerfiles * specify correct push path for the ghcr.io * fix typo * hardcode image name * specify correct labels for upstream * add dockerhub tags * uncomment dockerhub login * restore Dockerfile.dev
30 lines
1.1 KiB
Docker
30 lines
1.1 KiB
Docker
FROM mzz2017/git:alpine AS version
|
|
WORKDIR /build
|
|
ADD .git ./.git
|
|
RUN git describe --abbrev=0 --tags | tee ./version
|
|
|
|
|
|
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
|
|
COPY --from=version /build/version ./
|
|
COPY --from=builder-web /build/web server/router/web
|
|
RUN export VERSION=$(cat ./version) && CGO_ENABLED=0 go build -ldflags="-X github.com/v2rayA/v2rayA/conf.Version=${VERSION:1} -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 tzdata
|
|
LABEL org.opencontainers.image.source=https://github.com/v2rayA/v2rayA
|
|
EXPOSE 2017
|
|
VOLUME /etc/v2raya
|
|
ENTRYPOINT ["v2raya"]
|