d2ray/Dockerfile

24 lines
644 B
Docker
Raw Normal View History

2021-04-10 08:21:07 +00:00
FROM alpine:latest
2023-08-21 13:05:44 +00:00
ENV VER_XRAY 1.8.3
2021-04-10 08:21:07 +00:00
2021-04-25 09:00:43 +00:00
# install packages
2023-08-21 13:05:44 +00:00
RUN set -xe && apk add --no-cache unzip wget openssl python3 py3-jinja2 supervisor apache2-utils bash
2022-12-02 12:52:11 +00:00
# download packages
RUN set -xe && \
2023-08-21 13:05:44 +00:00
mkdir -p /downloads && \
wget -P /downloads https://github.com/XTLS/Xray-core/releases/download/v$VER_XRAY/Xray-linux-64.zip && \
unzip /downloads/Xray-linux-64.zip -d /opt/xray && \
rm -rf /downloads
2022-12-02 12:52:11 +00:00
2022-12-05 07:46:24 +00:00
COPY ./opt /opt/
2022-12-02 12:52:11 +00:00
2021-04-25 09:00:43 +00:00
# nginx
2023-08-21 13:05:44 +00:00
# RUN set -xe && addgroup www && \
# adduser -H -D -S -s /bin/false www -G www && \
# chown -R www:www /opt/nginx
2021-04-25 09:00:43 +00:00
# remove packages
2022-12-05 07:46:24 +00:00
RUN set -xe && apk del unzip wget
2022-12-02 12:52:11 +00:00
CMD ["sh", "/opt/init.sh"]