Skip to content

Commit

Permalink
Merge pull request #40 from ambimax/v2-develop
Browse files Browse the repository at this point in the history
V2 develop
  • Loading branch information
tschifftner authored Apr 18, 2023
2 parents 9034703 + 03f606f commit 4ef0864
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
WORKDIR:
- 8.0/alpine3.16
- 8.0/buster
- 8.0/bullseye
- 8.1/alpine3.16
- 8.1/alpine3.17
- 8.1/bullseye
Expand Down
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ Currently supported Frameworks and Apps:

### PHP 8.0

| Distro | Image |
| ---------- | --------------------------------------------------------------------------------- |
| Buster | [ambimax/php-8.0-buster](https://hub.docker.com/r/ambimax/php-8.0-buster) |
| Alpine3.16 | [ambimax/php-8.0-alpine3.16](https://hub.docker.com/r/ambimax/php-8.0-alpine3.16) |
| Distro | Image |
| --------------- | --------------------------------------------------------------------------------- |
| Alpine 3.16 | [ambimax/php-8.0-alpine3.16](https://hub.docker.com/r/ambimax/php-8.0-alpine3.16) |
| 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

Expand All @@ -55,22 +55,15 @@ 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

| PHP Module | 8.0 | 8.1 | 8.2 |
| ------------ | --- | --- | --- |
| Core ||||
| PDO ||||
| Phar ||||
| Reflection ||||
| SPL ||||
| SimpleXML ||||
| Zend OPcache ||||
| apcu ||||
| bcmath ||||
| calendar ||||
| Core ||||
| ctype ||||
| curl ||||
| date ||||
Expand All @@ -94,16 +87,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 ||||
Expand All @@ -112,6 +110,7 @@ Currently supported Frameworks and Apps:
| xmlrpc ||||
| xmlwriter ||||
| xsl ||||
| Zend OPcache ||||
| zip ||||
| zlib ||||

Expand Down
22 changes: 17 additions & 5 deletions generateReadme.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class generateReadme
private array $extensions = [];

private array $debianVersions = [
'Buster' => 10,
'Bullseye' => 11,
];

Expand Down Expand Up @@ -49,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) {
Expand All @@ -67,7 +66,7 @@ protected function _setExtensions()
}
}

sort($this->availableExtensions);
sort($this->availableExtensions, SORT_NATURAL | SORT_FLAG_CASE);
}

public function getPhpAssetFileContent($filename, $phpVersion)
Expand Down Expand Up @@ -124,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();
Expand All @@ -138,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();
Expand Down Expand Up @@ -236,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;
}
}


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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.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"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 4ef0864

Please sign in to comment.