2021-04-10 08:21:07 +00:00
|
|
|
FROM alpine:latest
|
|
|
|
|
2021-04-23 06:51:06 +00:00
|
|
|
COPY image/ /opt/
|
2021-04-10 08:21:07 +00:00
|
|
|
|
2021-04-25 09:00:43 +00:00
|
|
|
# install packages
|
|
|
|
RUN set -xe && apk add --no-cache unzip wget nginx certbot openssl
|
|
|
|
|
|
|
|
# setup core files
|
|
|
|
RUN set -xe && mkdir -p /opt/xray && \
|
2021-04-23 06:51:06 +00:00
|
|
|
unzip /opt/Xray-linux-64.zip -d /opt/xray && \
|
|
|
|
rm /opt/Xray-linux-64.zip && \
|
2021-04-25 09:00:43 +00:00
|
|
|
chmod +x /opt/run.sh /opt/crypt.sh
|
|
|
|
|
|
|
|
# crond
|
2021-08-15 17:38:09 +00:00
|
|
|
# RUN set -xe && mv /opt/crontab /var/spool/cron/crontabs/root
|
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
|
|
|
|
RUN set -xe && apk del unzip wget
|
2021-04-10 08:21:07 +00:00
|
|
|
|
2021-04-10 10:37:39 +00:00
|
|
|
EXPOSE 80 443
|
2021-04-10 08:21:07 +00:00
|
|
|
|
2021-04-23 06:51:06 +00:00
|
|
|
CMD ["/opt/run.sh"]
|