mirror of
https://github.com/samuelhbne/proxy-xray.git
synced 2025-12-16 20:27:06 +03:00
Unified Dockfile
This commit is contained in:
10
.github/workflows/docker-buildx-dev.yml
vendored
10
.github/workflows/docker-buildx-dev.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.amd64
|
||||
file: ./Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.amd64
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ github.repository }}:amd64dev
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.arm64
|
||||
file: ./Dockerfile
|
||||
platforms: linux/arm64
|
||||
push: true
|
||||
tags: ${{ github.repository }}:arm64dev
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.arm
|
||||
file: ./Dockerfile
|
||||
platforms: linux/arm/v7
|
||||
push: true
|
||||
tags: ${{ github.repository }}:armv7dev
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.arm
|
||||
file: ./Dockerfile
|
||||
platforms: linux/arm/v6
|
||||
push: true
|
||||
tags: ${{ github.repository }}:armdev
|
||||
|
||||
10
.github/workflows/docker-buildx-latest.yml
vendored
10
.github/workflows/docker-buildx-latest.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.amd64
|
||||
file: ./Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.amd64
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ github.repository }}:amd64
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.arm64
|
||||
file: ./Dockerfile
|
||||
platforms: linux/arm64
|
||||
push: true
|
||||
tags: ${{ github.repository }}:arm64
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.arm
|
||||
file: ./Dockerfile
|
||||
platforms: linux/arm/v7
|
||||
push: true
|
||||
tags: ${{ github.repository }}:armv7
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.arm
|
||||
file: ./Dockerfile
|
||||
platforms: linux/arm/v6
|
||||
push: true
|
||||
tags: ${{ github.repository }}:arm
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM golang:1.20-alpine as builder
|
||||
FROM golang:1.19-alpine as builder
|
||||
|
||||
ARG XRAYVER='v1.7.5'
|
||||
ARG XRAYVER='v1.6.2'
|
||||
|
||||
RUN apk add --no-cache bash git build-base wget
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
FROM arm32v6/golang:1.20-alpine as builder
|
||||
|
||||
ARG XRAYVER='v1.7.5'
|
||||
|
||||
RUN apk add --no-cache bash git build-base wget
|
||||
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
|
||||
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf
|
||||
|
||||
WORKDIR /go/src/XTLS/Xray-core
|
||||
RUN git clone https://github.com/XTLS/Xray-core.git . && \
|
||||
git checkout ${XRAYVER} && \
|
||||
go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
|
||||
|
||||
|
||||
FROM arm32v6/alpine:3.17
|
||||
|
||||
COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/
|
||||
COPY --from=builder /tmp/geosite.dat /usr/local/bin/
|
||||
COPY --from=builder /tmp/geoip.dat /usr/local/bin/
|
||||
|
||||
RUN mkdir -p /etc/dnsmasq.disable
|
||||
|
||||
COPY --from=builder /tmp/apple.china.conf /etc/dnsmasq.disable/
|
||||
COPY --from=builder /tmp/google.china.conf /etc/dnsmasq.disable/
|
||||
COPY --from=builder /tmp/bogus-nxdomain.china.conf /etc/dnsmasq.disable/
|
||||
COPY --from=builder /tmp/accelerated-domains.china.conf /etc/dnsmasq.disable/
|
||||
|
||||
RUN apk update && apk add bash openssl curl jq moreutils \
|
||||
whois dnsmasq ca-certificates proxychains-ng npm
|
||||
RUN npm install -g qrcode-terminal --verbose
|
||||
|
||||
RUN sed -i "s/^socks4.*/socks5\t127.0.0.1 1080/g" /etc/proxychains/proxychains.conf
|
||||
|
||||
ADD proxy-ltx.sh /proxy-ltx.sh
|
||||
ADD proxy-ltt.sh /proxy-ltt.sh
|
||||
ADD proxy-ltpw.sh /proxy-ltpw.sh
|
||||
ADD proxy-lttw.sh /proxy-lttw.sh
|
||||
ADD proxy-ltpg.sh /proxy-ltpg.sh
|
||||
ADD proxy-lttg.sh /proxy-lttg.sh
|
||||
ADD proxy-mtt.sh /proxy-mtt.sh
|
||||
ADD proxy-mtpw.sh /proxy-mtpw.sh
|
||||
ADD proxy-mttw.sh /proxy-mttw.sh
|
||||
ADD proxy-ttt.sh /proxy-ttt.sh
|
||||
ADD proxy-ttpw.sh /proxy-ttpw.sh
|
||||
ADD proxy-tttw.sh /proxy-tttw.sh
|
||||
ADD status.sh /status.sh
|
||||
ADD run.sh /run.sh
|
||||
|
||||
RUN chmod 755 /*.sh
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
@@ -1,57 +0,0 @@
|
||||
FROM arm64v8/golang:1.20-alpine as builder
|
||||
|
||||
ARG XRAYVER='v1.7.5'
|
||||
|
||||
RUN apk add --no-cache bash git build-base wget
|
||||
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
|
||||
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf
|
||||
RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf
|
||||
|
||||
WORKDIR /go/src/XTLS/Xray-core
|
||||
RUN git clone https://github.com/XTLS/Xray-core.git . && \
|
||||
git checkout ${XRAYVER} && \
|
||||
go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
|
||||
|
||||
|
||||
FROM arm64v8/alpine:3.17
|
||||
|
||||
COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/
|
||||
COPY --from=builder /tmp/geosite.dat /usr/local/bin/
|
||||
COPY --from=builder /tmp/geoip.dat /usr/local/bin/
|
||||
|
||||
RUN mkdir -p /etc/dnsmasq.disable
|
||||
|
||||
COPY --from=builder /tmp/apple.china.conf /etc/dnsmasq.disable/
|
||||
COPY --from=builder /tmp/google.china.conf /etc/dnsmasq.disable/
|
||||
COPY --from=builder /tmp/bogus-nxdomain.china.conf /etc/dnsmasq.disable/
|
||||
COPY --from=builder /tmp/accelerated-domains.china.conf /etc/dnsmasq.disable/
|
||||
|
||||
RUN apk update && apk add bash openssl curl jq moreutils \
|
||||
whois dnsmasq ca-certificates proxychains-ng npm
|
||||
RUN npm install -g qrcode-terminal --verbose
|
||||
|
||||
RUN sed -i "s/^socks4.*/socks5\t127.0.0.1 1080/g" /etc/proxychains/proxychains.conf
|
||||
|
||||
ADD proxy-ltx.sh /proxy-ltx.sh
|
||||
ADD proxy-ltt.sh /proxy-ltt.sh
|
||||
ADD proxy-ltpw.sh /proxy-ltpw.sh
|
||||
ADD proxy-lttw.sh /proxy-lttw.sh
|
||||
ADD proxy-ltpg.sh /proxy-ltpg.sh
|
||||
ADD proxy-lttg.sh /proxy-lttg.sh
|
||||
ADD proxy-mtt.sh /proxy-mtt.sh
|
||||
ADD proxy-mtpw.sh /proxy-mtpw.sh
|
||||
ADD proxy-mttw.sh /proxy-mttw.sh
|
||||
ADD proxy-ttt.sh /proxy-ttt.sh
|
||||
ADD proxy-ttpw.sh /proxy-ttpw.sh
|
||||
ADD proxy-tttw.sh /proxy-tttw.sh
|
||||
ADD status.sh /status.sh
|
||||
ADD run.sh /run.sh
|
||||
|
||||
RUN chmod 755 /*.sh
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
Reference in New Issue
Block a user