From 02097a88002c52fa1aca6e294b5b2daa3bbb32e2 Mon Sep 17 00:00:00 2001 From: Tobias Schifftner Date: Tue, 18 Apr 2023 16:02:45 +0200 Subject: [PATCH 1/4] feat(php 8.0)!: add bullseye, alpine3.17 added php8.0-bullseye added php8.0-alpine3.17 removed php8.0-buster --- .github/workflows/default.yaml | 3 +- README.md | 4 +-- generateReadme.php | 1 - manifest.json | 2 +- variants/8.0/alpine3.17/variables.json | 32 +++++++++++++++++++ .../8.0/{buster => bullseye}/variables.json | 6 ++-- 6 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 variants/8.0/alpine3.17/variables.json rename variants/8.0/{buster => bullseye}/variables.json (79%) diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index 5c22275..7751141 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -14,7 +14,8 @@ jobs: matrix: WORKDIR: - 8.0/alpine3.16 - - 8.0/buster + - 8.0/alpine3.17 + - 8.0/bullseye - 8.1/alpine3.16 - 8.1/alpine3.17 - 8.1/bullseye diff --git a/README.md b/README.md index d0bbd79..fc52b17 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,9 @@ Currently supported Frameworks and Apps: | Distro | Image | | ---------- | --------------------------------------------------------------------------------- | -| Buster | [ambimax/php-8.0-buster](https://hub.docker.com/r/ambimax/php-8.0-buster) | +| Bullseye | [ambimax/php-8.0-bullseye](https://hub.docker.com/r/ambimax/php-8.0-bullseye) | | Alpine3.16 | [ambimax/php-8.0-alpine3.16](https://hub.docker.com/r/ambimax/php-8.0-alpine3.16) | +| Alpine3.17 | [ambimax/php-8.0-alpine3.17](https://hub.docker.com/r/ambimax/php-8.0-alpine3.17) | ### PHP 8.1 @@ -55,7 +56,6 @@ Currently supported Frameworks and Apps: | Alpine 3.16 | 2024-05-23 | | Alpine 3.17 | 2024-11-22 | | Debian Bullseye | 2024-07-01 | -| Debian Buster | 2022-09-10 | ## Installed php extensions diff --git a/generateReadme.php b/generateReadme.php index 7c68fa4..6e746e5 100644 --- a/generateReadme.php +++ b/generateReadme.php @@ -17,7 +17,6 @@ class generateReadme private array $extensions = []; private array $debianVersions = [ - 'Buster' => 10, 'Bullseye' => 11, ]; diff --git a/manifest.json b/manifest.json index 68a8de2..b4a89fc 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "images": { - "8.0": ["8.0/buster:buster", "8.0/alpine3.16:alpine3.16"], + "8.0": ["8.0/bullseye:bullseye", "8.0/alpine3.16:alpine3.16", "8.0/alpine3.17:alpine3.17"], "8.1": ["8.1/bullseye:bullseye", "8.1/alpine3.16:alpine3.16", "8.1/alpine3.17:alpine3.17"], "8.2": ["8.2/bullseye:bullseye", "8.2/alpine3.17:alpine3.17"] }, diff --git a/variants/8.0/alpine3.17/variables.json b/variants/8.0/alpine3.17/variables.json new file mode 100644 index 0000000..ef4900e --- /dev/null +++ b/variants/8.0/alpine3.17/variables.json @@ -0,0 +1,32 @@ +{ + "name": "ambimax/php-8.0-alpine3.17", + "base_image": "php:8.0-fpm-alpine3.17", + "distro": "alpine3.17", + "tag": "8.0", + "env": {}, + "php": { + "version": "8.0", + "extensions": [ + "apcu", + "bcmath", + "calendar", + "ctype", + "exif", + "igbinary", + "lzf", + "opcache", + "gd", + "gmp", + "gettext", + "intl", + "pdo_mysql", + "memcached", + "redis", + "xsl", + "soap", + "sockets", + "xmlrpc", + "zip" + ] + } +} diff --git a/variants/8.0/buster/variables.json b/variants/8.0/bullseye/variables.json similarity index 79% rename from variants/8.0/buster/variables.json rename to variants/8.0/bullseye/variables.json index f7b6bbc..bec81bd 100644 --- a/variants/8.0/buster/variables.json +++ b/variants/8.0/bullseye/variables.json @@ -1,7 +1,7 @@ { - "name": "ambimax/php-8.0-buster", - "base_image": "php:8.0-fpm-buster", - "distro": "buster", + "name": "ambimax/php-8.0-bullseye", + "base_image": "php:8.0-fpm-bullseye", + "distro": "bullseye", "tag": "8.0", "env": {}, "php": { From 5c0d3cb34c2ed59bd53fab5e10e1af8ede134167 Mon Sep 17 00:00:00 2001 From: Tobias Schifftner Date: Tue, 18 Apr 2023 16:23:10 +0200 Subject: [PATCH 2/4] feat: improved readabillity in README.md --- README.md | 42 +++++++++++++++++++++--------------------- generateReadme.php | 21 +++++++++++++++++---- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index fc52b17..fc58a82 100644 --- a/README.md +++ b/README.md @@ -15,26 +15,26 @@ Currently supported Frameworks and Apps: ### PHP 8.0 -| Distro | Image | -| ---------- | --------------------------------------------------------------------------------- | -| Bullseye | [ambimax/php-8.0-bullseye](https://hub.docker.com/r/ambimax/php-8.0-bullseye) | -| Alpine3.16 | [ambimax/php-8.0-alpine3.16](https://hub.docker.com/r/ambimax/php-8.0-alpine3.16) | -| Alpine3.17 | [ambimax/php-8.0-alpine3.17](https://hub.docker.com/r/ambimax/php-8.0-alpine3.17) | +| Distro | Image | +| --------------- | --------------------------------------------------------------------------------- | +| Alpine 3.16 | [ambimax/php-8.0-alpine3.16](https://hub.docker.com/r/ambimax/php-8.0-alpine3.16) | +| Alpine 3.17 | [ambimax/php-8.0-alpine3.17](https://hub.docker.com/r/ambimax/php-8.0-alpine3.17) | +| Debian Bullseye | [ambimax/php-8.0-bullseye](https://hub.docker.com/r/ambimax/php-8.0-bullseye) | ### PHP 8.1 -| Distro | Image | -| ---------- | --------------------------------------------------------------------------------- | -| Bullseye | [ambimax/php-8.1-bullseye](https://hub.docker.com/r/ambimax/php-8.1-bullseye) | -| Alpine3.16 | [ambimax/php-8.1-alpine3.16](https://hub.docker.com/r/ambimax/php-8.1-alpine3.16) | -| Alpine3.17 | [ambimax/php-8.1-alpine3.17](https://hub.docker.com/r/ambimax/php-8.1-alpine3.17) | +| Distro | Image | +| --------------- | --------------------------------------------------------------------------------- | +| Alpine 3.16 | [ambimax/php-8.1-alpine3.16](https://hub.docker.com/r/ambimax/php-8.1-alpine3.16) | +| Alpine 3.17 | [ambimax/php-8.1-alpine3.17](https://hub.docker.com/r/ambimax/php-8.1-alpine3.17) | +| Debian Bullseye | [ambimax/php-8.1-bullseye](https://hub.docker.com/r/ambimax/php-8.1-bullseye) | ### PHP 8.2 -| Distro | Image | -| ---------- | --------------------------------------------------------------------------------- | -| Bullseye | [ambimax/php-8.2-bullseye](https://hub.docker.com/r/ambimax/php-8.2-bullseye) | -| Alpine3.17 | [ambimax/php-8.2-alpine3.17](https://hub.docker.com/r/ambimax/php-8.2-alpine3.17) | +| Distro | Image | +| --------------- | --------------------------------------------------------------------------------- | +| Alpine 3.17 | [ambimax/php-8.2-alpine3.17](https://hub.docker.com/r/ambimax/php-8.2-alpine3.17) | +| Debian Bullseye | [ambimax/php-8.2-bullseye](https://hub.docker.com/r/ambimax/php-8.2-bullseye) | **Older images** can be found on https://hub.docker.com/u/ambimax @@ -61,16 +61,10 @@ Currently supported Frameworks and Apps: | PHP Module | 8.0 | 8.1 | 8.2 | | ------------ | --- | --- | --- | -| Core | ✓ | ✓ | ✓ | -| PDO | ✓ | ✓ | ✓ | -| Phar | ✓ | ✓ | ✓ | -| Reflection | ✓ | ✓ | ✓ | -| SPL | ✓ | ✓ | ✓ | -| SimpleXML | ✓ | ✓ | ✓ | -| Zend OPcache | ✓ | ✓ | ✓ | | apcu | ✓ | ✓ | ✓ | | bcmath | ✓ | ✓ | ✓ | | calendar | ✓ | ✓ | ✓ | +| Core | ✓ | ✓ | ✓ | | ctype | ✓ | ✓ | ✓ | | curl | ✓ | ✓ | ✓ | | date | ✓ | ✓ | ✓ | @@ -94,16 +88,21 @@ Currently supported Frameworks and Apps: | mysqlnd | ✓ | ✓ | ✓ | | openssl | ✓ | ✓ | ✓ | | pcre | ✓ | ✓ | ✓ | +| PDO | ✓ | ✓ | ✓ | | pdo_mysql | ✓ | ✓ | ✓ | | pdo_sqlite | ✓ | ✓ | ✓ | +| Phar | ✓ | ✓ | ✓ | | posix | ✓ | ✓ | ✓ | | random | | | ✓ | | readline | ✓ | ✓ | ✓ | | redis | ✓ | ✓ | ✓ | +| Reflection | ✓ | ✓ | ✓ | | session | ✓ | ✓ | ✓ | +| SimpleXML | ✓ | ✓ | ✓ | | soap | ✓ | ✓ | ✓ | | sockets | ✓ | ✓ | ✓ | | sodium | ✓ | ✓ | ✓ | +| SPL | ✓ | ✓ | ✓ | | sqlite3 | ✓ | ✓ | ✓ | | standard | ✓ | ✓ | ✓ | | tokenizer | ✓ | ✓ | ✓ | @@ -112,6 +111,7 @@ Currently supported Frameworks and Apps: | xmlrpc | ✓ | ✓ | ✓ | | xmlwriter | ✓ | ✓ | ✓ | | xsl | ✓ | ✓ | ✓ | +| Zend OPcache | ✓ | ✓ | ✓ | | zip | ✓ | ✓ | ✓ | | zlib | ✓ | ✓ | ✓ | diff --git a/generateReadme.php b/generateReadme.php index 6e746e5..724088e 100644 --- a/generateReadme.php +++ b/generateReadme.php @@ -48,14 +48,14 @@ protected function _parseManifest() } } } - sort($this->distros); + sort($this->distros, SORT_NATURAL | SORT_FLAG_CASE); } protected function _setExtensions() { foreach($this->phpVersions as $phpVersion) { $this->extensions[$phpVersion] = $this->getModules($phpVersion); - sort($this->extensions[$phpVersion]); + sort($this->extensions[$phpVersion], SORT_NATURAL | SORT_FLAG_CASE); } foreach($this->extensions as $phpVersion => $extensions) { @@ -66,7 +66,7 @@ protected function _setExtensions() } } - sort($this->availableExtensions); + sort($this->availableExtensions, SORT_NATURAL | SORT_FLAG_CASE); } public function getPhpAssetFileContent($filename, $phpVersion) @@ -123,6 +123,7 @@ public function getDockerHubMatrix() foreach($this->images as $phpVersion => $distroString) { $markdown[] = sprintf('### PHP %s', $phpVersion); + sort($distroString, SORT_NATURAL | SORT_FLAG_CASE); // create instance of the table builder $tableBuilder = new Builder(); @@ -137,7 +138,7 @@ public function getDockerHubMatrix() $name = sprintf('ambimax/php-%s-%s', $phpVersion, $distro); $url = sprintf('https://hub.docker.com/r/ambimax/php-%s-%s', $phpVersion, $distro); $link = sprintf('[%s](%s)', $name, $url); - $tableBuilder->row([ucfirst($distro), $link]); + $tableBuilder->row([$this->getDistroName($distro), $link]); } $markdown[] = $tableBuilder->render(); @@ -235,6 +236,18 @@ public function render() { file_put_contents('README.md', $this->renderTemplate()); } + + public function getDistroName($distro): string { + switch(strtolower($distro)) { + case preg_match('/alpine(.*)/i', $distro, $match) ? true : false: + return sprintf('Alpine %s',$match[1]); + + default: + return sprintf('Debian %s', ucfirst($distro)); + } + + return $distro; + } } From 443cb813fae9cbeb1b733cbccef6d7ee86cf227a Mon Sep 17 00:00:00 2001 From: Tobias Schifftner Date: Tue, 18 Apr 2023 16:34:21 +0200 Subject: [PATCH 3/4] fix: there is no php-8.0-alpine3.17 base image --- .github/workflows/default.yaml | 1 - manifest.json | 2 +- variants/8.0/alpine3.17/variables.json | 32 -------------------------- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 variants/8.0/alpine3.17/variables.json diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index 7751141..d0600bb 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -14,7 +14,6 @@ jobs: matrix: WORKDIR: - 8.0/alpine3.16 - - 8.0/alpine3.17 - 8.0/bullseye - 8.1/alpine3.16 - 8.1/alpine3.17 diff --git a/manifest.json b/manifest.json index b4a89fc..7cc7d42 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "images": { - "8.0": ["8.0/bullseye:bullseye", "8.0/alpine3.16:alpine3.16", "8.0/alpine3.17:alpine3.17"], + "8.0": ["8.0/bullseye:bullseye", "8.0/alpine3.16:alpine3.16"], "8.1": ["8.1/bullseye:bullseye", "8.1/alpine3.16:alpine3.16", "8.1/alpine3.17:alpine3.17"], "8.2": ["8.2/bullseye:bullseye", "8.2/alpine3.17:alpine3.17"] }, diff --git a/variants/8.0/alpine3.17/variables.json b/variants/8.0/alpine3.17/variables.json deleted file mode 100644 index ef4900e..0000000 --- a/variants/8.0/alpine3.17/variables.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "ambimax/php-8.0-alpine3.17", - "base_image": "php:8.0-fpm-alpine3.17", - "distro": "alpine3.17", - "tag": "8.0", - "env": {}, - "php": { - "version": "8.0", - "extensions": [ - "apcu", - "bcmath", - "calendar", - "ctype", - "exif", - "igbinary", - "lzf", - "opcache", - "gd", - "gmp", - "gettext", - "intl", - "pdo_mysql", - "memcached", - "redis", - "xsl", - "soap", - "sockets", - "xmlrpc", - "zip" - ] - } -} From 03f606f2c45fa2e63240406b854974c661495a3a Mon Sep 17 00:00:00 2001 From: Tobias Schifftner Date: Tue, 18 Apr 2023 16:36:25 +0200 Subject: [PATCH 4/4] fix: README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index fc58a82..1c6ad4f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ Currently supported Frameworks and Apps: | Distro | Image | | --------------- | --------------------------------------------------------------------------------- | | Alpine 3.16 | [ambimax/php-8.0-alpine3.16](https://hub.docker.com/r/ambimax/php-8.0-alpine3.16) | -| Alpine 3.17 | [ambimax/php-8.0-alpine3.17](https://hub.docker.com/r/ambimax/php-8.0-alpine3.17) | | Debian Bullseye | [ambimax/php-8.0-bullseye](https://hub.docker.com/r/ambimax/php-8.0-bullseye) | ### PHP 8.1