瀏覽代碼

Update Dockerfile

Teddysun 1 月之前
父節點
當前提交
abe60a07d3
共有 2 個文件被更改,包括 10 次插入8 次删除
  1. 4 4
      docker/xray/Dockerfile
  2. 6 4
      docker/xray/Dockerfile.architecture

+ 4 - 4
docker/xray/Dockerfile

@@ -1,5 +1,5 @@
 # Dockerfile for xray based alpine
-# Copyright (C) 2019 - 2024 Teddysun <[email protected]>
+# Copyright (C) 2019 - 2025 Teddysun <[email protected]>
 # Reference URL:
 # https://github.com/XTLS/Xray-core
 # https://github.com/v2fly/v2ray-core
@@ -13,13 +13,13 @@ WORKDIR /root
 COPY xray.sh /root/xray.sh
 COPY config.json /etc/xray/config.json
 RUN set -ex \
-	&& apk add --no-cache tzdata ca-certificates \
+	&& apk add --no-cache bash tzdata ca-certificates openssl \
 	&& mkdir -p /var/log/xray /usr/share/xray \
 	&& chmod +x /root/xray.sh \
 	&& /root/xray.sh \
 	&& rm -fv /root/xray.sh \
-	&& wget -O /usr/share/xray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \
-	&& wget -O /usr/share/xray/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
+	&& wget -O /usr/share/xray/geosite.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat \
+	&& wget -O /usr/share/xray/geoip.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat
 
 VOLUME /etc/xray
 ENV TZ=Asia/Shanghai

+ 6 - 4
docker/xray/Dockerfile.architecture

@@ -1,5 +1,5 @@
 # Dockerfile for xray based alpine
-# Copyright (C) 2019 - 2024 Teddysun <[email protected]>
+# Copyright (C) 2019 - 2025 Teddysun <[email protected]>
 # Reference URL:
 # https://github.com/XTLS/Xray-core
 # https://github.com/v2fly/v2ray-core
@@ -14,14 +14,16 @@ WORKDIR /root
 COPY xray.sh /root/xray.sh
 COPY config.json /etc/xray/config.json
 RUN set -ex \
-	&& apk add --no-cache tzdata ca-certificates \
+	&& apk add --no-cache bash tzdata ca-certificates openssl \
 	&& mkdir -p /var/log/xray /usr/share/xray \
 	&& chmod +x /root/xray.sh \
 	&& /root/xray.sh "${TARGETPLATFORM}" \
 	&& rm -fv /root/xray.sh \
-	&& wget -O /usr/share/xray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \
-	&& wget -O /usr/share/xray/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
+	&& wget -O /usr/share/xray/geosite.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat \
+	&& wget -O /usr/share/xray/geoip.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat
 
 VOLUME /etc/xray
+VOLUME /var/log/xray
+
 ENV TZ=Asia/Shanghai
 CMD [ "/usr/bin/xray", "-config", "/etc/xray/config.json" ]