Update Dockerfile

This commit is contained in:
Teddysun 2020-12-31 16:43:12 +09:00
parent 937e34b1e9
commit 9f95a3fb0f
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D
2 changed files with 12 additions and 12 deletions

View File

@ -2,9 +2,9 @@
# Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com> # Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com>
# Reference URL: # Reference URL:
# https://github.com/XTLS/Xray-core # https://github.com/XTLS/Xray-core
# https://github.com/v2ray/v2ray-core # https://github.com/v2fly/v2ray-core
# https://github.com/v2ray/geoip # https://github.com/v2fly/geoip
# https://github.com/v2ray/domain-list-community # https://github.com/v2fly/domain-list-community
FROM alpine:latest FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>" LABEL maintainer="Teddysun <i@teddysun.com>"
@ -14,12 +14,12 @@ COPY xray.sh /root/xray.sh
COPY config.json /etc/xray/config.json COPY config.json /etc/xray/config.json
RUN set -ex \ RUN set -ex \
&& apk add --no-cache tzdata ca-certificates \ && apk add --no-cache tzdata ca-certificates \
&& mkdir -p /var/log/xray \ && mkdir -p /var/log/xray /usr/local/share/xray \
&& chmod +x /root/xray.sh \ && chmod +x /root/xray.sh \
&& /root/xray.sh \ && /root/xray.sh \
&& rm -fv /root/xray.sh \ && rm -fv /root/xray.sh \
&& wget -O /usr/bin/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \ && wget -O /usr/local/share/xray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \
&& wget -O /usr/bin/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat && wget -O /usr/local/share/xray/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
VOLUME /etc/xray VOLUME /etc/xray
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai

View File

@ -2,9 +2,9 @@
# Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com> # Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com>
# Reference URL: # Reference URL:
# https://github.com/XTLS/Xray-core # https://github.com/XTLS/Xray-core
# https://github.com/v2ray/v2ray-core # https://github.com/v2fly/v2ray-core
# https://github.com/v2ray/geoip # https://github.com/v2fly/geoip
# https://github.com/v2ray/domain-list-community # https://github.com/v2fly/domain-list-community
FROM --platform=${TARGETPLATFORM} alpine:latest FROM --platform=${TARGETPLATFORM} alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>" LABEL maintainer="Teddysun <i@teddysun.com>"
@ -15,12 +15,12 @@ COPY xray.sh /root/xray.sh
COPY config.json /etc/xray/config.json COPY config.json /etc/xray/config.json
RUN set -ex \ RUN set -ex \
&& apk add --no-cache tzdata ca-certificates \ && apk add --no-cache tzdata ca-certificates \
&& mkdir -p /var/log/xray \ && mkdir -p /var/log/xray /usr/local/share/xray \
&& chmod +x /root/xray.sh \ && chmod +x /root/xray.sh \
&& /root/xray.sh "${TARGETPLATFORM}" \ && /root/xray.sh "${TARGETPLATFORM}" \
&& rm -fv /root/xray.sh \ && rm -fv /root/xray.sh \
&& wget -O /usr/bin/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \ && wget -O /usr/local/share/xray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \
&& wget -O /usr/bin/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat && wget -O /usr/local/share/xray/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
VOLUME /etc/xray VOLUME /etc/xray
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai