From 48a24abd9145b4c643be4171139c5b2e8c07e900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 18 Aug 2026 16:21:16 +0200 Subject: [PATCH] Remove Adminer 4 --- .github/workflows/image.yml | 2 - 4/Dockerfile | 61 ------------------------------- 4/entrypoint.sh | 20 ---------- 4/fastcgi/Dockerfile | 55 ---------------------------- 4/fastcgi/entrypoint.sh | 20 ---------- 4/fastcgi/index.php | 43 ---------------------- 4/fastcgi/plugin-loader.php | 73 ------------------------------------- 4/index.php | 43 ---------------------- 4/plugin-loader.php | 73 ------------------------------------- 9 files changed, 390 deletions(-) delete mode 100644 4/Dockerfile delete mode 100755 4/entrypoint.sh delete mode 100644 4/fastcgi/Dockerfile delete mode 100755 4/fastcgi/entrypoint.sh delete mode 100644 4/fastcgi/index.php delete mode 100644 4/fastcgi/plugin-loader.php delete mode 100644 4/index.php delete mode 100644 4/plugin-loader.php diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 242e8c8..da54d16 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -10,8 +10,6 @@ jobs: strategy: matrix: variant: - - "4" - - "4/fastcgi" - "5" - "5/fastcgi" - "6" diff --git a/4/Dockerfile b/4/Dockerfile deleted file mode 100644 index 15509e8..0000000 --- a/4/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -FROM php:8.4-alpine - -RUN echo "upload_max_filesize = 128M" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \ -&& echo "post_max_size = 128M" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \ -&& echo "memory_limit = 1G" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \ -&& echo "max_execution_time = 600" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \ -&& echo "max_input_vars = 5000" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini - -STOPSIGNAL SIGINT - -RUN addgroup -S adminer \ -&& adduser -S -G adminer adminer \ -&& mkdir -p /var/www/html \ -&& mkdir /var/www/html/plugins-enabled \ -&& chown -R adminer:adminer /var/www/html - -WORKDIR /var/www/html - -RUN set -x \ -&& apk add --no-cache --virtual .build-deps \ - postgresql-dev \ - sqlite-dev \ - unixodbc-dev \ - freetds-dev \ -&& docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr \ -&& docker-php-ext-install \ - mysqli \ - pdo_pgsql \ - pdo_sqlite \ - pdo_odbc \ - pdo_dblib \ -&& runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )" \ -&& apk add --virtual .phpexts-rundeps $runDeps \ -&& apk del --no-network .build-deps - -COPY *.php /var/www/html/ - -ENV ADMINER_VERSION=4.17.1 -ENV ADMINER_DOWNLOAD_SHA256=58956bc021b6b260b1a2ef32d03517f6f88f5ad4aa03ff2d0092c6f509e26d0a -ENV ADMINER_SRC_DOWNLOAD_SHA256=6e006c514a3f189dd14ee10fa98977141a00fe79beb2a515966c98f0914cbdd0 - -RUN set -x \ -&& curl -fsSL https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -o adminer.php \ -&& echo "$ADMINER_DOWNLOAD_SHA256 adminer.php" |sha256sum -c - \ -&& curl -fsSL https://github.com/vrana/adminer/archive/v$ADMINER_VERSION.tar.gz -o source.tar.gz \ -&& echo "$ADMINER_SRC_DOWNLOAD_SHA256 source.tar.gz" |sha256sum -c - \ -&& tar xzf source.tar.gz --strip-components=1 "adminer-$ADMINER_VERSION/designs/" "adminer-$ADMINER_VERSION/plugins/" \ -&& rm source.tar.gz - -COPY entrypoint.sh /usr/local/bin/ -ENTRYPOINT [ "entrypoint.sh", "docker-php-entrypoint" ] - -USER adminer -CMD [ "php", "-S", "[::]:8080", "-t", "/var/www/html" ] - -EXPOSE 8080 diff --git a/4/entrypoint.sh b/4/entrypoint.sh deleted file mode 100755 index 15fa976..0000000 --- a/4/entrypoint.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -e - -if [ -n "$ADMINER_DESIGN" ]; then - # Only create link on initial start, to ensure that explicit changes to - # adminer.css after the container was started once are preserved. - if [ ! -e .adminer-init ]; then - ln -sf "designs/$ADMINER_DESIGN/adminer.css" . - fi -fi - -number=1 -for PLUGIN in $ADMINER_PLUGINS; do - php plugin-loader.php "$PLUGIN" > plugins-enabled/$(printf "%03d" $number)-$PLUGIN.php - number=$(($number+1)) -done - -touch .adminer-init || true - -exec "$@" diff --git a/4/fastcgi/Dockerfile b/4/fastcgi/Dockerfile deleted file mode 100644 index be3e561..0000000 --- a/4/fastcgi/Dockerfile +++ /dev/null @@ -1,55 +0,0 @@ -FROM php:8.4-fpm-alpine - -RUN echo "upload_max_filesize = 128M" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \ -&& echo "post_max_size = 128M" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \ -&& echo "memory_limit = 1G" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \ -&& echo "max_execution_time = 600" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \ -&& echo "max_input_vars = 5000" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini - -RUN addgroup -S adminer \ -&& adduser -S -G adminer adminer \ -&& mkdir -p /var/www/html \ -&& mkdir /var/www/html/plugins-enabled \ -&& chown -R adminer:adminer /var/www/html - -RUN set -x \ -&& apk add --no-cache --virtual .build-deps \ - postgresql-dev \ - sqlite-dev \ - unixodbc-dev \ - freetds-dev \ -&& docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr \ -&& docker-php-ext-install \ - mysqli \ - pdo_pgsql \ - pdo_sqlite \ - pdo_odbc \ - pdo_dblib \ -&& runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )" \ -&& apk add --virtual .phpexts-rundeps $runDeps \ -&& apk del --no-network .build-deps - -COPY *.php /var/www/html/ - -ENV ADMINER_VERSION=4.17.1 -ENV ADMINER_DOWNLOAD_SHA256=58956bc021b6b260b1a2ef32d03517f6f88f5ad4aa03ff2d0092c6f509e26d0a -ENV ADMINER_SRC_DOWNLOAD_SHA256=6e006c514a3f189dd14ee10fa98977141a00fe79beb2a515966c98f0914cbdd0 - -RUN set -x \ -&& curl -fsSL https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -o adminer.php \ -&& echo "$ADMINER_DOWNLOAD_SHA256 adminer.php" |sha256sum -c - \ -&& curl -fsSL https://github.com/vrana/adminer/archive/v$ADMINER_VERSION.tar.gz -o source.tar.gz \ -&& echo "$ADMINER_SRC_DOWNLOAD_SHA256 source.tar.gz" |sha256sum -c - \ -&& tar xzf source.tar.gz --strip-components=1 "adminer-$ADMINER_VERSION/designs/" "adminer-$ADMINER_VERSION/plugins/" \ -&& rm source.tar.gz - -COPY entrypoint.sh /usr/local/bin/ -ENTRYPOINT [ "entrypoint.sh", "docker-php-entrypoint" ] - -USER adminer -CMD [ "php-fpm" ] diff --git a/4/fastcgi/entrypoint.sh b/4/fastcgi/entrypoint.sh deleted file mode 100755 index 15fa976..0000000 --- a/4/fastcgi/entrypoint.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -e - -if [ -n "$ADMINER_DESIGN" ]; then - # Only create link on initial start, to ensure that explicit changes to - # adminer.css after the container was started once are preserved. - if [ ! -e .adminer-init ]; then - ln -sf "designs/$ADMINER_DESIGN/adminer.css" . - fi -fi - -number=1 -for PLUGIN in $ADMINER_PLUGINS; do - php plugin-loader.php "$PLUGIN" > plugins-enabled/$(printf "%03d" $number)-$PLUGIN.php - number=$(($number+1)) -done - -touch .adminer-init || true - -exec "$@" diff --git a/4/fastcgi/index.php b/4/fastcgi/index.php deleted file mode 100644 index a48629f..0000000 --- a/4/fastcgi/index.php +++ /dev/null @@ -1,43 +0,0 @@ - 1) { - fwrite(STDERR, 'Unable to load plugin file "'.$name.'", because it defines multiple classes.'."\n"); - exit(1); -} - -// Check constructor. -$class = $classes[0]; -require($file); - -$constructor = (new \ReflectionClass($class))->getConstructor(); - -if ($constructor && $constructor->getNumberOfRequiredParameters() > 0) { - $requiredParameters = array_slice($constructor->getParameters(), 0, $constructor->getNumberOfRequiredParameters()); - - fwrite(STDERR, 'Unable to load plugin file "'.$name.'", because it has required parameters: '.implode(', ', array_map(function ($item) { - return $item->getName(); - }, $requiredParameters))."\n". -'Create a file "'.getcwd().'/plugins-enabled/'.$name.'.php" with the following contents to load the plugin:'."\n\n". -'getDocComment().' -return new '.$class.'( - '.implode(",\n\t", array_map(function ($item) { - return '$'.$item->getName()." = ".($item->isOptional() ? var_export($item->getDefaultValue(), true) : '???'); - }, $constructor->getParameters())).' -); -'); - exit(1); -} - -echo ' 1) { - fwrite(STDERR, 'Unable to load plugin file "'.$name.'", because it defines multiple classes.'."\n"); - exit(1); -} - -// Check constructor. -$class = $classes[0]; -require($file); - -$constructor = (new \ReflectionClass($class))->getConstructor(); - -if ($constructor && $constructor->getNumberOfRequiredParameters() > 0) { - $requiredParameters = array_slice($constructor->getParameters(), 0, $constructor->getNumberOfRequiredParameters()); - - fwrite(STDERR, 'Unable to load plugin file "'.$name.'", because it has required parameters: '.implode(', ', array_map(function ($item) { - return $item->getName(); - }, $requiredParameters))."\n". -'Create a file "'.getcwd().'/plugins-enabled/'.$name.'.php" with the following contents to load the plugin:'."\n\n". -'getDocComment().' -return new '.$class.'( - '.implode(",\n\t", array_map(function ($item) { - return '$'.$item->getName()." = ".($item->isOptional() ? var_export($item->getDefaultValue(), true) : '???'); - }, $constructor->getParameters())).' -); -'); - exit(1); -} - -echo '