Dockerfile.architecture 976 B

12345678910111213141516171819202122232425262728
  1. # Dockerfile for xray based alpine
  2. # Copyright (C) 2019 - 2025 Teddysun <[email protected]>
  3. # Reference URL:
  4. # https://github.com/XTLS/Xray-core
  5. # https://github.com/v2fly/v2ray-core
  6. # https://github.com/Loyalsoldier/v2ray-rules-dat
  7. FROM alpine:latest
  8. LABEL maintainer="Teddysun <[email protected]>"
  9. ARG TARGETPLATFORM
  10. WORKDIR /root
  11. COPY xray.sh /root/xray.sh
  12. COPY config.json /etc/xray/config.json
  13. RUN set -ex \
  14. && apk add --no-cache bash tzdata ca-certificates openssl \
  15. && mkdir -p /var/log/xray /usr/share/xray \
  16. && chmod +x /root/xray.sh \
  17. && /root/xray.sh "${TARGETPLATFORM}" \
  18. && rm -fv /root/xray.sh \
  19. && wget -O /usr/share/xray/geosite.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat \
  20. && wget -O /usr/share/xray/geoip.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat
  21. VOLUME /etc/xray
  22. VOLUME /var/log/xray
  23. ENV TZ=Asia/Shanghai
  24. CMD [ "/usr/bin/xray", "-config", "/etc/xray/config.json" ]