Dockerfile.architecture 955 B

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