Skip to content

Commit

Permalink
Removed php
Browse files Browse the repository at this point in the history
  • Loading branch information
bokolob committed May 2, 2024
1 parent 7ad93e9 commit fd35067
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 148 deletions.
119 changes: 25 additions & 94 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
build-base \
cargo \
libffi-dev \
libxml2-dev \
libxslt-dev \
Expand All @@ -27,57 +26,10 @@ RUN \
apk add --no-cache \
fail2ban \
gnupg \
memcached \
nginx-mod-http-brotli \
nginx-mod-http-dav-ext \
nginx-mod-http-echo \
nginx-mod-http-fancyindex \
nginx-mod-http-geoip2 \
nginx-mod-http-headers-more \
nginx-mod-http-image-filter \
nginx-mod-http-perl \
nginx-mod-http-redis2 \
nginx-mod-http-set-misc \
nginx-mod-http-upload-progress \
nginx-mod-http-xslt-filter \
nginx-mod-mail \
nginx-mod-rtmp \
nginx-mod-stream \
nginx-mod-stream-geoip2 \
nginx-vim \
php83-bcmath \
php83-bz2 \
php83-dom \
php83-exif \
php83-ftp \
php83-gd \
php83-gmp \
php83-imap \
php83-intl \
php83-ldap \
php83-mysqli \
php83-mysqlnd \
php83-opcache \
php83-pdo_mysql \
php83-pdo_odbc \
php83-pdo_pgsql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-apcu \
php83-pecl-memcached \
php83-pecl-redis \
php83-pgsql \
php83-posix \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-tokenizer \
php83-xmlreader \
php83-xsl \
whois && \
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \
php83-pecl-mcrypt && \
&& \
echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT_VERSION=$(curl -sL https://pypi.python.org/pypi/certbot/json |jq -r '. | .info.version'); \
Expand All @@ -88,50 +40,6 @@ RUN \
wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.19/ \
certbot==${CERTBOT_VERSION} \
certbot-dns-acmedns \
certbot-dns-aliyun \
certbot-dns-azure \
certbot-dns-bunny \
certbot-dns-cloudflare \
certbot-dns-cpanel \
certbot-dns-desec \
certbot-dns-digitalocean \
certbot-dns-directadmin \
certbot-dns-dnsimple \
certbot-dns-dnsmadeeasy \
certbot-dns-dnspod \
certbot-dns-do \
certbot-dns-domeneshop \
certbot-dns-dreamhost \
certbot-dns-duckdns \
certbot-dns-dynudns \
certbot-dns-freedns \
certbot-dns-gehirn \
certbot-dns-glesys \
certbot-dns-godaddy \
certbot-dns-google \
certbot-dns-google-domains \
certbot-dns-he \
certbot-dns-hetzner \
certbot-dns-infomaniak \
certbot-dns-inwx \
certbot-dns-ionos \
certbot-dns-linode \
certbot-dns-loopia \
certbot-dns-luadns \
certbot-dns-namecheap \
certbot-dns-netcup \
certbot-dns-njalla \
certbot-dns-nsone \
certbot-dns-ovh \
certbot-dns-porkbun \
certbot-dns-rfc2136 \
certbot-dns-route53 \
certbot-dns-sakuracloud \
certbot-dns-standalone \
certbot-dns-transip \
certbot-dns-vultr \
certbot-plugin-gandi \
cryptography \
future \
requests && \
Expand Down Expand Up @@ -172,8 +80,31 @@ RUN \
/defaults/nginx/proxy-confs --strip-components=1 --exclude=linux*/.editorconfig --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
build-dependencies \
php83 \
php83-ctype \
php83-curl \
php83-fileinfo \
php83-fpm \
php83-iconv \
php83-json \
php83-mbstring \
php83-openssl \
php83-phar \
php83-session \
php83-simplexml \
php83-xml \
php83-xmlwriter \
php83-zip \
php83-zlib && \
rm -rf \
/etc/s6-overlay/s6-rc.d/init-php/ \
/etc/s6-overlay/s6-rc.d/svc-php-fpm/ \
/etc/s6-overlay/s6-rc.d/user/contents.d/svc-php-fpm \
/etc/s6-overlay/s6-rc.d/user/contents.d/init-php \
/etc/s6-overlay/s6-rc.d/init-keygen/dependencies.d/init-php \
/etc/logrotate.d/php-fpm \
./config/php \
/tmp/* \
$HOME/.cache \
$HOME/.cargo
Expand Down
31 changes: 0 additions & 31 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -45,39 +45,8 @@ RUN \
nginx-mod-stream \
nginx-mod-stream-geoip2 \
nginx-vim \
php83-bcmath \
php83-bz2 \
php83-dom \
php83-exif \
php83-ftp \
php83-gd \
php83-gmp \
php83-imap \
php83-intl \
php83-ldap \
php83-mysqli \
php83-mysqlnd \
php83-opcache \
php83-pdo_mysql \
php83-pdo_odbc \
php83-pdo_pgsql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-apcu \
php83-pecl-memcached \
php83-pecl-redis \
php83-pgsql \
php83-posix \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-tokenizer \
php83-xmlreader \
php83-xsl \
whois && \
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \
php83-pecl-mcrypt && \
echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT_VERSION=$(curl -sL https://pypi.python.org/pypi/certbot/json |jq -r '. | .info.version'); \
Expand Down
25 changes: 2 additions & 23 deletions root/defaults/nginx/site-confs/default.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ server {
include /config/nginx/ssl.conf;

root /config/www;
index index.html index.htm index.php;
index index.html index.htm;

# enable subfolder method reverse proxy confs
include /config/nginx/proxy-confs/*.subfolder.conf;
Expand Down Expand Up @@ -48,28 +48,7 @@ server {
# enable for Authentik (requires authentik-server.conf in the server block)
#include /config/nginx/authentik-location.conf;

try_files $uri $uri/ /index.html /index.htm /index.php$is_args$args;
}

location ~ ^(.+\.php)(.*)$ {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

# enable for ldap auth (requires ldap-server.conf in the server block)
#include /config/nginx/ldap-location.conf;

# enable for Authelia (requires authelia-server.conf in the server block)
#include /config/nginx/authelia-location.conf;

# enable for Authentik (requires authentik-server.conf in the server block)
#include /config/nginx/authentik-location.conf;

fastcgi_split_path_info ^(.+\.php)(.*)$;
if (!-f $document_root$fastcgi_script_name) { return 404; }
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
try_files $uri $uri/ /index.html;
}

# deny access to .htaccess/.htpasswd files
Expand Down

0 comments on commit fd35067

Please sign in to comment.