2021-04-10 08:21:07 +00:00
|
|
|
FROM alpine:latest
|
|
|
|
|
2022-12-06 11:26:03 +00:00
|
|
|
ENV VER_XRAY 1.6.1
|
2022-12-02 12:52:11 +00:00
|
|
|
ENV VER_SO 2.5.20
|
2022-12-02 15:29:29 +00:00
|
|
|
ENV VER_NG 1.7.23
|
2021-04-10 08:21:07 +00:00
|
|
|
|
2021-04-25 09:00:43 +00:00
|
|
|
# install packages
|
2022-12-05 07:46:24 +00:00
|
|
|
RUN set -xe && apk add --no-cache unzip wget nginx certbot openssl python3 py3-jinja2 supervisor apache2-utils bash
|
2022-12-02 12:52:11 +00:00
|
|
|
|
|
|
|
# download packages
|
|
|
|
RUN set -xe && \
|
2022-12-05 07:46:24 +00:00
|
|
|
mkdir -p /downloads /downloads/others /downloads/android && \
|
|
|
|
wget -P /downloads/others https://github.com/XTLS/Xray-core/releases/download/v$VER_XRAY/Xray-windows-64.zip && \
|
|
|
|
wget -P /downloads/others https://github.com/XTLS/Xray-core/releases/download/v$VER_XRAY/Xray-linux-64.zip && \
|
|
|
|
wget -P /downloads/others https://github.com/FelisCatus/SwitchyOmega/releases/download/v$VER_SO/SwitchyOmega_Chromium.crx && \
|
|
|
|
wget -P /downloads/android https://github.com/2dust/v2rayNG/releases/download/$VER_NG/v2rayNG_"$VER_NG"_arm64-v8a.apk && \
|
|
|
|
wget -P /downloads/others https://github.com/XTLS/Xray-core/releases/download/v$VER_XRAY/Xray-macos-64.zip && \
|
|
|
|
wget -P /downloads/others https://github.com/XTLS/Xray-core/releases/download/v$VER_XRAY/Xray-macos-arm64-v8a.zip
|
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
|
|
|
|
2022-12-05 07:46:24 +00:00
|
|
|
# xray
|
|
|
|
RUN set -xe && unzip /downloads/others/Xray-linux-64.zip -d /opt/xray
|
2021-04-25 09:00:43 +00:00
|
|
|
|
|
|
|
# nginx
|
|
|
|
RUN set -xe && addgroup www && \
|
2021-04-10 10:36:23 +00:00
|
|
|
adduser -H -D -S -s /bin/false www -G www && \
|
2021-04-25 09:00:43 +00:00
|
|
|
chown -R www:www /opt/nginx
|
|
|
|
|
|
|
|
# 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
|
|
|
EXPOSE 80
|
|
|
|
VOLUME /etc/letsencrypt
|
|
|
|
CMD ["sh", "/opt/init.sh"]
|