@@ -12,148 +12,145 @@ ENV DHLEVEL=2048 ONLY_SUBDOMAINS=false AWS_CONFIG_FILE=/config/dns-conf/route53.
1212ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
1313
1414RUN \
15- echo "**** install build packages ****" && \
16- apk add --no-cache --virtual=build-dependencies \
17- cargo \
18- g++ \
19- gcc \
20- libffi-dev \
21- openssl-dev \
22- python3-dev && \
23- echo "**** install runtime packages ****" && \
24- apk add --no-cache --upgrade \
25- curl \
26- fail2ban \
27- gnupg \
28- memcached \
29- nginx \
30- nginx-mod-http-brotli \
31- nginx-mod-http-dav-ext \
32- nginx-mod-http-echo \
33- nginx-mod-http-fancyindex \
34- nginx-mod-http-geoip2 \
35- nginx-mod-http-headers-more \
36- nginx-mod-http-image-filter \
37- nginx-mod-http-nchan \
38- nginx-mod-http-perl \
39- nginx-mod-http-redis2 \
40- nginx-mod-http-set-misc \
41- nginx-mod-http-upload-progress \
42- nginx-mod-http-xslt-filter \
43- nginx-mod-mail \
44- nginx-mod-rtmp \
45- nginx-mod-stream \
46- nginx-mod-stream-geoip2 \
47- nginx-vim \
48- php7-bcmath \
49- php7-bz2 \
50- php7-ctype \
51- php7-curl \
52- php7-dom \
53- php7-exif \
54- php7-ftp \
55- php7-gd \
56- php7-gmp \
57- php7-iconv \
58- php7-imap \
59- php7-intl \
60- php7-ldap \
61- php7-mcrypt \
62- php7-memcached \
63- php7-mysqli \
64- php7-mysqlnd \
65- php7-opcache \
66- php7-pdo_mysql \
67- php7-pdo_odbc \
68- php7-pdo_pgsql \
69- php7-pdo_sqlite \
70- php7-pear \
71- php7-pecl-apcu \
72- php7-pecl-mailparse \
73- php7-pecl-redis \
74- php7-pgsql \
75- php7-phar \
76- php7-posix \
77- php7-soap \
78- php7-sockets \
79- php7-sodium \
80- php7-sqlite3 \
81- php7-tokenizer \
82- php7-xml \
83- php7-xmlreader \
84- php7-xmlrpc \
85- php7-xsl \
86- php7-zip \
87- py3-cryptography \
88- py3-future \
89- py3-pip \
90- whois && \
91- echo "**** install certbot plugins ****" && \
92- if [ -z ${CERTBOT_VERSION+x} ]; then \
93- CERTBOT="certbot" ; \
94- else \
95- CERTBOT="certbot==${CERTBOT_VERSION}" ; \
96- fi && \
97- pip3 install -U \
98- pip && \
99- pip3 install -U \
100- ${CERTBOT} \
101- certbot-dns-aliyun \
102- certbot-dns-cloudflare \
103- certbot-dns-cloudxns \
104- certbot-dns-cpanel \
105- certbot-dns-digitalocean \
106- certbot-dns-directadmin \
107- certbot-dns-dnsimple \
108- certbot-dns-dnsmadeeasy \
109- certbot-dns-domeneshop \
110- certbot-dns-google \
111- certbot-dns-hetzner \
112- certbot-dns-inwx \
113- certbot-dns-linode \
114- certbot-dns-luadns \
115- certbot-dns-netcup \
116- certbot-dns-njalla \
117- certbot-dns-nsone \
118- certbot-dns-ovh \
119- certbot-dns-rfc2136 \
120- certbot-dns-route53 \
121- certbot-dns-transip \
122- certbot-dns-vultr \
123- certbot-plugin-gandi \
124- cryptography \
125- requests && \
126- echo "**** remove unnecessary fail2ban filters ****" && \
127- rm \
128- /etc/fail2ban/jail.d/alpine-ssh.conf && \
129- echo "**** copy fail2ban default action and filter to /default ****" && \
130- mkdir -p /defaults/fail2ban && \
131- mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
132- mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
133- echo "**** copy proxy confs to /default ****" && \
134- mkdir -p /defaults/proxy-confs && \
135- curl -o \
136- /tmp/proxy.tar.gz -L \
137- "https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
138- tar xf \
139- /tmp/proxy.tar.gz -C \
140- /defaults/proxy-confs --strip-components=1 --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
141- echo "**** configure nginx ****" && \
142- rm -f /etc/nginx/conf.d/default.conf && \
143- curl -o \
144- /defaults/dhparams.pem -L \
145- "https://lsio.ams3.digitaloceanspaces.com/dhparams.pem" && \
146- echo "**** cleanup ****" && \
147- apk del --purge \
148- build-dependencies && \
149- for cleanfiles in *.pyc *.pyo; \
150- do \
151- find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
152- ; done && \
153- rm -rf \
154- /tmp/* \
155- /root/.cache \
156- /root/.cargo
15+ echo "**** install build packages ****" && \
16+ apk add --no-cache --virtual=build-dependencies \
17+ cargo \
18+ g++ \
19+ gcc \
20+ libffi-dev \
21+ openssl-dev \
22+ python3-dev && \
23+ echo "**** install runtime packages ****" && \
24+ apk add --no-cache --upgrade \
25+ curl \
26+ fail2ban \
27+ gnupg \
28+ memcached \
29+ nginx \
30+ nginx-mod-http-brotli \
31+ nginx-mod-http-dav-ext \
32+ nginx-mod-http-echo \
33+ nginx-mod-http-fancyindex \
34+ nginx-mod-http-geoip2 \
35+ nginx-mod-http-headers-more \
36+ nginx-mod-http-image-filter \
37+ nginx-mod-http-nchan \
38+ nginx-mod-http-perl \
39+ nginx-mod-http-redis2 \
40+ nginx-mod-http-set-misc \
41+ nginx-mod-http-upload-progress \
42+ nginx-mod-http-xslt-filter \
43+ nginx-mod-mail \
44+ nginx-mod-rtmp \
45+ nginx-mod-stream \
46+ nginx-mod-stream-geoip2 \
47+ nginx-vim \
48+ php7-bcmath \
49+ php7-bz2 \
50+ php7-ctype \
51+ php7-curl \
52+ php7-dom \
53+ php7-exif \
54+ php7-ftp \
55+ php7-gd \
56+ php7-gmp \
57+ php7-iconv \
58+ php7-imap \
59+ php7-intl \
60+ php7-ldap \
61+ php7-mcrypt \
62+ php7-memcached \
63+ php7-mysqli \
64+ php7-mysqlnd \
65+ php7-opcache \
66+ php7-pdo_mysql \
67+ php7-pdo_odbc \
68+ php7-pdo_pgsql \
69+ php7-pdo_sqlite \
70+ php7-pear \
71+ php7-pecl-apcu \
72+ php7-pecl-mailparse \
73+ php7-pecl-redis \
74+ php7-pgsql \
75+ php7-phar \
76+ php7-posix \
77+ php7-soap \
78+ php7-sockets \
79+ php7-sodium \
80+ php7-sqlite3 \
81+ php7-tokenizer \
82+ php7-xml \
83+ php7-xmlreader \
84+ php7-xmlrpc \
85+ php7-xsl \
86+ php7-zip \
87+ py3-cryptography \
88+ py3-future \
89+ py3-pip \
90+ whois && \
91+ echo "**** install certbot plugins ****" && \
92+ if [ -z ${CERTBOT_VERSION+x} ]; then \
93+ CERTBOT="certbot" ; \
94+ else \
95+ CERTBOT="certbot==${CERTBOT_VERSION}" ; \
96+ fi && \
97+ pip3 install -U \
98+ pip && \
99+ pip3 install -U --find-links https://wheel-index.linuxserver.io/alpine/ \
100+ ${CERTBOT} \
101+ certbot-dns-aliyun \
102+ certbot-dns-cloudflare \
103+ certbot-dns-cloudxns \
104+ certbot-dns-cpanel \
105+ certbot-dns-digitalocean \
106+ certbot-dns-directadmin \
107+ certbot-dns-dnsimple \
108+ certbot-dns-dnsmadeeasy \
109+ certbot-dns-domeneshop \
110+ certbot-dns-google \
111+ certbot-dns-hetzner \
112+ certbot-dns-inwx \
113+ certbot-dns-linode \
114+ certbot-dns-luadns \
115+ certbot-dns-netcup \
116+ certbot-dns-njalla \
117+ certbot-dns-nsone \
118+ certbot-dns-ovh \
119+ certbot-dns-rfc2136 \
120+ certbot-dns-route53 \
121+ certbot-dns-transip \
122+ certbot-dns-vultr \
123+ certbot-plugin-gandi \
124+ cryptography \
125+ requests && \
126+ echo "**** remove unnecessary fail2ban filters ****" && \
127+ rm \
128+ /etc/fail2ban/jail.d/alpine-ssh.conf && \
129+ echo "**** copy fail2ban default action and filter to /default ****" && \
130+ mkdir -p /defaults/fail2ban && \
131+ mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
132+ mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
133+ echo "**** copy proxy confs to /default ****" && \
134+ mkdir -p /defaults/proxy-confs && \
135+ curl -o \
136+ /tmp/proxy.tar.gz -L \
137+ "https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
138+ tar xf \
139+ /tmp/proxy.tar.gz -C \
140+ /defaults/proxy-confs --strip-components=1 --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
141+ echo "**** configure nginx ****" && \
142+ rm -f /etc/nginx/conf.d/default.conf && \
143+ echo "**** cleanup ****" && \
144+ apk del --purge \
145+ build-dependencies && \
146+ for cleanfiles in *.pyc *.pyo; \
147+ do \
148+ find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
149+ ; done && \
150+ rm -rf \
151+ /tmp/* \
152+ /root/.cache \
153+ /root/.cargo
157154
158155# add local files
159156COPY root/ /
0 commit comments