-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.architecture
27 lines (24 loc) · 983 Bytes
/
Dockerfile.architecture
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Dockerfile for xray based alpine
# Copyright (C) 2019 - 2021 Teddysun <[email protected]>
# Reference URL:
# https://github.com/XTLS/Xray-core
# https://github.com/v2fly/v2ray-core
# https://github.com/v2fly/geoip
# https://github.com/v2fly/domain-list-community
FROM --platform=${TARGETPLATFORM} alpine:latest
LABEL maintainer="Teddysun <[email protected]>"
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 \
&& 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
VOLUME /etc/xray
ENV TZ=Asia/Shanghai
CMD [ "/usr/bin/xray", "-config", "/etc/xray/config.json" ]