Merge pull request #315 from linuxserver/3.17

Rebase to alpine 3.17 with php8.1
This commit is contained in:
Eric Nemchik 2023-01-21 13:24:04 -06:00 committed by GitHub
commit 46e5156c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 216 additions and 209 deletions

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.15 # syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@ -14,9 +16,8 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apk add --no-cache --virtual=build-dependencies \
build-base \
cargo \ cargo \
g++ \
gcc \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
@ -24,11 +25,9 @@ RUN \
python3-dev && \ python3-dev && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \ apk add --no-cache --upgrade \
curl \
fail2ban \ fail2ban \
gnupg \ gnupg \
memcached \ memcached \
nginx \
nginx-mod-http-brotli \ nginx-mod-http-brotli \
nginx-mod-http-dav-ext \ nginx-mod-http-dav-ext \
nginx-mod-http-echo \ nginx-mod-http-echo \
@ -46,62 +45,57 @@ RUN \
nginx-mod-stream \ nginx-mod-stream \
nginx-mod-stream-geoip2 \ nginx-mod-stream-geoip2 \
nginx-vim \ nginx-vim \
php8-bcmath \ php81-bcmath \
php8-bz2 \ php81-bz2 \
php8-ctype \ php81-ctype \
php8-curl \ php81-curl \
php8-dom \ php81-dom \
php8-exif \ php81-exif \
php8-ftp \ php81-ftp \
php8-gd \ php81-gd \
php8-gmp \ php81-gmp \
php8-iconv \ php81-iconv \
php8-imap \ php81-imap \
php8-intl \ php81-intl \
php8-ldap \ php81-ldap \
php8-mysqli \ php81-mysqli \
php8-mysqlnd \ php81-mysqlnd \
php8-opcache \ php81-opcache \
php8-pdo_mysql \ php81-pdo_mysql \
php8-pdo_odbc \ php81-pdo_odbc \
php8-pdo_pgsql \ php81-pdo_pgsql \
php8-pdo_sqlite \ php81-pdo_sqlite \
php8-pear \ php81-pear \
php8-pecl-apcu \ php81-pecl-apcu \
php8-pecl-mailparse \ php81-pecl-mailparse \
php8-pecl-mcrypt \ php81-pecl-memcached \
php8-pecl-memcached \ php81-pecl-redis \
php8-pecl-redis \ php81-pgsql \
php8-pgsql \ php81-phar \
php8-phar \ php81-posix \
php8-posix \ php81-soap \
php8-soap \ php81-sockets \
php8-sockets \ php81-sodium \
php8-sodium \ php81-sqlite3 \
php8-sqlite3 \ php81-tokenizer \
php8-tokenizer \ php81-xmlreader \
php8-xml \ php81-xsl \
php8-xmlreader \ php81-zip \
php8-xsl \
php8-zip \
py3-cryptography \
py3-future \
py3-pip \
whois && \ whois && \
apk add --no-cache \ apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \ php81-pecl-mcrypt \
php8-pecl-xmlrpc && \ php81-pecl-xmlrpc && \
echo "**** install certbot plugins ****" && \ echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \ if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT="certbot"; \ CERTBOT_VERSION=$(curl -sL https://pypi.python.org/pypi/certbot/json |jq -r '. | .info.version'); \
else \
CERTBOT="certbot==${CERTBOT_VERSION}"; \
fi && \ fi && \
pip3 install -U \ python3 -m ensurepip && \
pip wheel && \ pip3 install -U --no-cache-dir \
pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \ pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
acme==${CERTBOT_VERSION} \ acme==${CERTBOT_VERSION} \
${CERTBOT} \ certbot==${CERTBOT_VERSION} \
certbot-dns-acmedns \ certbot-dns-acmedns \
certbot-dns-aliyun \ certbot-dns-aliyun \
certbot-dns-azure \ certbot-dns-azure \
@ -141,6 +135,7 @@ RUN \
certbot-dns-vultr \ certbot-dns-vultr \
certbot-plugin-gandi \ certbot-plugin-gandi \
cryptography \ cryptography \
future \
requests && \ requests && \
echo "**** enable OCSP stapling from base ****" && \ echo "**** enable OCSP stapling from base ****" && \
sed -i \ sed -i \
@ -176,14 +171,10 @@ RUN \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
apk del --purge \ apk del --purge \
build-dependencies && \ build-dependencies && \
for cleanfiles in *.pyc *.pyo; \
do \
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
; done && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/root/.cache \ $HOME/.cache \
/root/.cargo $HOME/.cargo
# copy local files # copy local files
COPY root/ / COPY root/ /

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.15 # syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@ -14,9 +16,8 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apk add --no-cache --virtual=build-dependencies \
build-base \
cargo \ cargo \
g++ \
gcc \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
@ -24,11 +25,9 @@ RUN \
python3-dev && \ python3-dev && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \ apk add --no-cache --upgrade \
curl \
fail2ban \ fail2ban \
gnupg \ gnupg \
memcached \ memcached \
nginx \
nginx-mod-http-brotli \ nginx-mod-http-brotli \
nginx-mod-http-dav-ext \ nginx-mod-http-dav-ext \
nginx-mod-http-echo \ nginx-mod-http-echo \
@ -46,62 +45,57 @@ RUN \
nginx-mod-stream \ nginx-mod-stream \
nginx-mod-stream-geoip2 \ nginx-mod-stream-geoip2 \
nginx-vim \ nginx-vim \
php8-bcmath \ php81-bcmath \
php8-bz2 \ php81-bz2 \
php8-ctype \ php81-ctype \
php8-curl \ php81-curl \
php8-dom \ php81-dom \
php8-exif \ php81-exif \
php8-ftp \ php81-ftp \
php8-gd \ php81-gd \
php8-gmp \ php81-gmp \
php8-iconv \ php81-iconv \
php8-imap \ php81-imap \
php8-intl \ php81-intl \
php8-ldap \ php81-ldap \
php8-mysqli \ php81-mysqli \
php8-mysqlnd \ php81-mysqlnd \
php8-opcache \ php81-opcache \
php8-pdo_mysql \ php81-pdo_mysql \
php8-pdo_odbc \ php81-pdo_odbc \
php8-pdo_pgsql \ php81-pdo_pgsql \
php8-pdo_sqlite \ php81-pdo_sqlite \
php8-pear \ php81-pear \
php8-pecl-apcu \ php81-pecl-apcu \
php8-pecl-mailparse \ php81-pecl-mailparse \
php8-pecl-mcrypt \ php81-pecl-memcached \
php8-pecl-memcached \ php81-pecl-redis \
php8-pecl-redis \ php81-pgsql \
php8-pgsql \ php81-phar \
php8-phar \ php81-posix \
php8-posix \ php81-soap \
php8-soap \ php81-sockets \
php8-sockets \ php81-sodium \
php8-sodium \ php81-sqlite3 \
php8-sqlite3 \ php81-tokenizer \
php8-tokenizer \ php81-xmlreader \
php8-xml \ php81-xsl \
php8-xmlreader \ php81-zip \
php8-xsl \
php8-zip \
py3-cryptography \
py3-future \
py3-pip \
whois && \ whois && \
apk add --no-cache \ apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \ php81-pecl-mcrypt \
php8-pecl-xmlrpc && \ php81-pecl-xmlrpc && \
echo "**** install certbot plugins ****" && \ echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \ if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT="certbot"; \ CERTBOT_VERSION=$(curl -sL https://pypi.python.org/pypi/certbot/json |jq -r '. | .info.version'); \
else \
CERTBOT="certbot==${CERTBOT_VERSION}"; \
fi && \ fi && \
pip3 install -U \ python3 -m ensurepip && \
pip wheel && \ pip3 install -U --no-cache-dir \
pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \ pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
acme==${CERTBOT_VERSION} \ acme==${CERTBOT_VERSION} \
${CERTBOT} \ certbot==${CERTBOT_VERSION} \
certbot-dns-acmedns \ certbot-dns-acmedns \
certbot-dns-aliyun \ certbot-dns-aliyun \
certbot-dns-azure \ certbot-dns-azure \
@ -141,6 +135,7 @@ RUN \
certbot-dns-vultr \ certbot-dns-vultr \
certbot-plugin-gandi \ certbot-plugin-gandi \
cryptography \ cryptography \
future \
requests && \ requests && \
echo "**** enable OCSP stapling from base ****" && \ echo "**** enable OCSP stapling from base ****" && \
sed -i \ sed -i \
@ -176,14 +171,10 @@ RUN \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
apk del --purge \ apk del --purge \
build-dependencies && \ build-dependencies && \
for cleanfiles in *.pyc *.pyo; \
do \
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
; done && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/root/.cache \ $HOME/.cache \
/root/.cargo $HOME/.cargo
# copy local files # copy local files
COPY root/ / COPY root/ /

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.15 # syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.17
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@ -14,9 +16,8 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apk add --no-cache --virtual=build-dependencies \
build-base \
cargo \ cargo \
g++ \
gcc \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
@ -24,11 +25,9 @@ RUN \
python3-dev && \ python3-dev && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \ apk add --no-cache --upgrade \
curl \
fail2ban \ fail2ban \
gnupg \ gnupg \
memcached \ memcached \
nginx \
nginx-mod-http-brotli \ nginx-mod-http-brotli \
nginx-mod-http-dav-ext \ nginx-mod-http-dav-ext \
nginx-mod-http-echo \ nginx-mod-http-echo \
@ -46,62 +45,57 @@ RUN \
nginx-mod-stream \ nginx-mod-stream \
nginx-mod-stream-geoip2 \ nginx-mod-stream-geoip2 \
nginx-vim \ nginx-vim \
php8-bcmath \ php81-bcmath \
php8-bz2 \ php81-bz2 \
php8-ctype \ php81-ctype \
php8-curl \ php81-curl \
php8-dom \ php81-dom \
php8-exif \ php81-exif \
php8-ftp \ php81-ftp \
php8-gd \ php81-gd \
php8-gmp \ php81-gmp \
php8-iconv \ php81-iconv \
php8-imap \ php81-imap \
php8-intl \ php81-intl \
php8-ldap \ php81-ldap \
php8-mysqli \ php81-mysqli \
php8-mysqlnd \ php81-mysqlnd \
php8-opcache \ php81-opcache \
php8-pdo_mysql \ php81-pdo_mysql \
php8-pdo_odbc \ php81-pdo_odbc \
php8-pdo_pgsql \ php81-pdo_pgsql \
php8-pdo_sqlite \ php81-pdo_sqlite \
php8-pear \ php81-pear \
php8-pecl-apcu \ php81-pecl-apcu \
php8-pecl-mailparse \ php81-pecl-mailparse \
php8-pecl-mcrypt \ php81-pecl-memcached \
php8-pecl-memcached \ php81-pecl-redis \
php8-pecl-redis \ php81-pgsql \
php8-pgsql \ php81-phar \
php8-phar \ php81-posix \
php8-posix \ php81-soap \
php8-soap \ php81-sockets \
php8-sockets \ php81-sodium \
php8-sodium \ php81-sqlite3 \
php8-sqlite3 \ php81-tokenizer \
php8-tokenizer \ php81-xmlreader \
php8-xml \ php81-xsl \
php8-xmlreader \ php81-zip \
php8-xsl \
php8-zip \
py3-cryptography \
py3-future \
py3-pip \
whois && \ whois && \
apk add --no-cache \ apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \ php81-pecl-mcrypt \
php8-pecl-xmlrpc && \ php81-pecl-xmlrpc && \
echo "**** install certbot plugins ****" && \ echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \ if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT="certbot"; \ CERTBOT_VERSION=$(curl -sL https://pypi.python.org/pypi/certbot/json |jq -r '. | .info.version'); \
else \
CERTBOT="certbot==${CERTBOT_VERSION}"; \
fi && \ fi && \
pip3 install -U \ python3 -m ensurepip && \
pip wheel && \ pip3 install -U --no-cache-dir \
pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \ pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
acme==${CERTBOT_VERSION} \ acme==${CERTBOT_VERSION} \
${CERTBOT} \ certbot==${CERTBOT_VERSION} \
certbot-dns-acmedns \ certbot-dns-acmedns \
certbot-dns-aliyun \ certbot-dns-aliyun \
certbot-dns-azure \ certbot-dns-azure \
@ -141,6 +135,7 @@ RUN \
certbot-dns-vultr \ certbot-dns-vultr \
certbot-plugin-gandi \ certbot-plugin-gandi \
cryptography \ cryptography \
future \
requests && \ requests && \
echo "**** enable OCSP stapling from base ****" && \ echo "**** enable OCSP stapling from base ****" && \
sed -i \ sed -i \
@ -176,14 +171,10 @@ RUN \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
apk del --purge \ apk del --purge \
build-dependencies && \ build-dependencies && \
for cleanfiles in *.pyc *.pyo; \
do \
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
; done && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/root/.cache \ $HOME/.cache \
/root/.cargo $HOME/.cargo
# copy local files # copy local files
COPY root/ / COPY root/ /

View File

@ -335,6 +335,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **20.01.23:** - Rebase to alpine 3.17 with php8.1.
* **16.01.23:** - Remove nchan module because it keeps causing crashes. * **16.01.23:** - Remove nchan module because it keeps causing crashes.
* **08.12.22:** - Revamp certbot init. * **08.12.22:** - Revamp certbot init.
* **03.12.22:** - Remove defunct cloudxns plugin. * **03.12.22:** - Remove defunct cloudxns plugin.

View File

@ -154,6 +154,7 @@ app_setup_block: |
# changelog # changelog
changelogs: changelogs:
- { date: "20.01.23:", desc: "Rebase to alpine 3.17 with php8.1." }
- { date: "16.01.23:", desc: "Remove nchan module because it keeps causing crashes." } - { date: "16.01.23:", desc: "Remove nchan module because it keeps causing crashes." }
- { date: "08.12.22:", desc: "Revamp certbot init."} - { date: "08.12.22:", desc: "Revamp certbot init."}
- { date: "03.12.22:", desc: "Remove defunct cloudxns plugin."} - { date: "03.12.22:", desc: "Remove defunct cloudxns plugin."}

View File

@ -6,10 +6,10 @@
if [[ ! "${ORIGVALIDATION}" = "dns" ]] && [[ ! "${ORIGVALIDATION}" = "duckdns" ]]; then if [[ ! "${ORIGVALIDATION}" = "dns" ]] && [[ ! "${ORIGVALIDATION}" = "duckdns" ]]; then
if pgrep -f "s6-supervise nginx" >/dev/null; then if pgrep -f "s6-supervise nginx" >/dev/null; then
s6-svc -u /run/service/nginx s6-svc -u /run/service/svc-nginx
fi fi
else else
if pgrep -f "nginx:" >/dev/null; then if pgrep -f "nginx:" >/dev/null; then
s6-svc -h /run/service/nginx s6-svc -h /run/service/svc-nginx
fi fi
fi fi

View File

@ -6,6 +6,6 @@
if [[ ! "${ORIGVALIDATION}" = "dns" ]] && [[ ! "${ORIGVALIDATION}" = "duckdns" ]]; then if [[ ! "${ORIGVALIDATION}" = "dns" ]] && [[ ! "${ORIGVALIDATION}" = "duckdns" ]]; then
if pgrep -f "nginx:" >/dev/null; then if pgrep -f "nginx:" >/dev/null; then
s6-svc -d /run/service/nginx s6-svc -d /run/service/svc-nginx
fi fi
fi fi

View File

@ -1,11 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# copy crontabs if needed
if [[ ! -f /config/crontabs/root ]]; then
cp /etc/crontabs/root /config/crontabs/
fi
# import user crontabs
rm /etc/crontabs/*
cp /config/crontabs/* /etc/crontabs/

View File

@ -31,12 +31,15 @@ fi
# copy dns default configs # copy dns default configs
cp -n /defaults/dns-conf/* /config/dns-conf/ cp -n /defaults/dns-conf/* /config/dns-conf/
chown -R abc:abc /config/dns-conf lsiown -R abc:abc /config/dns-conf
# copy default renewal hooks # copy default renewal hooks
chmod -R +x /defaults/etc/letsencrypt/renewal-hooks chmod -R +x /defaults/etc/letsencrypt/renewal-hooks
cp -nR /defaults/etc/letsencrypt/renewal-hooks/* /config/etc/letsencrypt/renewal-hooks/ cp -nR /defaults/etc/letsencrypt/renewal-hooks/* /config/etc/letsencrypt/renewal-hooks/
chown -R abc:abc /config/etc/letsencrypt/renewal-hooks lsiown -R abc:abc /config/etc/letsencrypt/renewal-hooks
# replace nginx service location in renewal hooks
find /config/etc/letsencrypt/renewal-hooks/ -type f -exec sed -i 's|/run/service/nginx|/run/service/svc-nginx|g' {} \;
# create original config file if it doesn't exist, move non-hidden legacy file to hidden # create original config file if it doesn't exist, move non-hidden legacy file to hidden
if [[ -f "/config/donoteditthisfile.conf" ]]; then if [[ -f "/config/donoteditthisfile.conf" ]]; then

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-certbot-config/run

View File

@ -0,0 +1,17 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# if root crontabs do not exist in config
# copy root crontab from system
if [[ ! -f /config/crontabs/root ]] && crontab -l -u root; then
crontab -l -u root >/config/crontabs/root
fi
# if root crontabs still do not exist in config (were not copied from system)
# copy root crontab from included defaults
if [[ ! -f /config/crontabs/root ]]; then
cp /etc/crontabs/root /config/crontabs/
fi
# import user crontabs
crontab -u root /config/crontabs/root

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-crontabs-config/run

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-fail2ban-config/run

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-folders-config/run

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-nginx-config/run

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-outdated-config/run

View File

@ -2,7 +2,7 @@
# shellcheck shell=bash # shellcheck shell=bash
# permissions # permissions
chown -R abc:abc \ lsiown -R abc:abc \
/config /config
chmod -R 0644 /etc/logrotate.d chmod -R 0644 /etc/logrotate.d
chmod -R +r /config/log chmod -R +r /config/log

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-permissions-config/run

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-renew/run

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-require-url/run

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-samples-config/run

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-test-run/run

View File

@ -0,0 +1 @@
longrun