Skip to content

Commit

Permalink
test: rewrite stable docker image build 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Markson Hon committed Nov 12, 2023
1 parent 267ff3e commit 561d0cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ jobs:
IMAGE="mzz2017/v2raya"
echo image=${IMAGE} >> $GITHUB_OUTPUT
echo tag=${TAG} >> $GITHUB_OUTPUT
echo tag=${TAG} > ./version
sed -i "s|${TAG}|Realv2rayAVersion|g" install/docker/docker_helper.sh
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
Expand Down
7 changes: 1 addition & 6 deletions install/docker/Dockerfile.Action
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
FROM mzz2017/git:alpine AS version
WORKDIR /build
ADD .git ./.git
RUN git describe --abbrev=0 --tags | tee ./version

FROM alpine:latest AS builder
WORKDIR /build
COPY ./install/docker/docker_helper.sh ./docker_helper.sh
COPY ./version ./version
RUN sh -c "$(cat ./docker_helper.sh)"
RUN apk add --no-cache iptables ip6tables nftables
RUN rm ./docker_helper.sh
Expand Down
9 changes: 4 additions & 5 deletions install/docker/docker_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ case "$(arch)" in
*)
;;
esac
v2raya_version=$(cat ./version)
wget https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-$v2ray_arch.zip
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-$v2ray_arch.zip
wget https://github.com/v2rayA/v2rayA/releases/download/v$v2raya_version/v2raya_linux_"$v2raya_arch"_"$v2raya_version"
unzip v2ray-linux-$v2ray_arch.zip -d v2ray
wget https://github.com/v2rayA/v2rayA/releases/download/vRealv2rayAVersion/v2raya_linux_"$v2raya_arch"_Realv2rayAVersion
unzip v2ray-linux-"$v2ray_arch".zip -d v2ray
install ./v2ray/v2ray /usr/local/bin/v2ray
unzip Xray-linux-$v2ray_arch.zip -d xray
unzip Xray-linux-"$v2ray_arch".zip -d xray
install ./xray/xray /usr/local/bin/xray
install ./v2raya_linux_"$v2raya_arch"_"$v2raya_version" /usr/bin/v2raya
install ./v2raya_linux_"$v2raya_arch"_Realv2rayAVersion /usr/bin/v2raya
mkdir /usr/local/share/v2raya
ln -s /usr/local/share/v2ray /usr/local/share/v2raya
ln -s /usr/local/share/xray /usr/local/share/v2raya
Expand Down

0 comments on commit 561d0cb

Please sign in to comment.