across/docker/xray/Dockerfile.architecture

28 lines
955 B
Docker
Raw Normal View History

2020-11-25 20:53:52 +09:00
# Dockerfile for xray based alpine
2024-12-29 23:22:33 +09:00
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
2020-11-25 20:53:52 +09:00
# Reference URL:
# https://github.com/XTLS/Xray-core
2020-12-31 16:43:12 +09:00
# https://github.com/v2fly/v2ray-core
# https://github.com/v2fly/geoip
# https://github.com/v2fly/domain-list-community
2020-11-25 20:53:52 +09:00
2024-12-29 23:22:33 +09:00
FROM alpine:latest
2020-11-25 20:53:52 +09:00
LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM
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 \
2021-06-19 15:51:45 +09:00
&& mkdir -p /var/log/xray /usr/share/xray \
2020-11-25 20:53:52 +09:00
&& chmod +x /root/xray.sh \
&& /root/xray.sh "${TARGETPLATFORM}" \
&& rm -fv /root/xray.sh \
2021-06-19 15:51:45 +09:00
&& 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
2020-11-25 20:53:52 +09:00
VOLUME /etc/xray
ENV TZ=Asia/Shanghai
CMD [ "/usr/bin/xray", "-config", "/etc/xray/config.json" ]