diff --git a/docker-bake.hcl b/docker-bake.hcl index 6f9b76ab..8d110536 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -103,7 +103,7 @@ target "default" { tags = distinct(flatten( [for pv in php_version(php-version) : flatten([ LATEST ? tag("latest", os, pv, tgt) : [], - tag(SHA == "" ? "" : "sha-${substr(SHA, 0, 7)}", os, pv, tgt), + tag(SHA == "" || SHA == VERSION ? "" : "sha-${substr(SHA, 0, 7)}", os, pv, tgt), [for v in semver(VERSION) : tag(v, os, pv, tgt)] ]) ])) @@ -129,7 +129,7 @@ target "static-builder" { ] tags = distinct(flatten([ LATEST ? "${IMAGE_NAME}:static-builder" : "", - SHA == "" ? "" : "${IMAGE_NAME}:static-builder-sha-${substr(SHA, 0, 7)}", + SHA == "" || SHA == VERSION ? "" : "${IMAGE_NAME}:static-builder-sha-${substr(SHA, 0, 7)}", [for v in semver(VERSION) : v == "latest" ? "${IMAGE_NAME}:static-builder": "${IMAGE_NAME}:static-builder-${v}"] ])) labels = { diff --git a/docs/docker.md b/docs/docker.md index 2bd1e11c..8558075c 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -2,7 +2,14 @@ [FrankenPHP Docker images](https://hub.docker.com/r/dunglas/frankenphp) are based on [official PHP images](https://hub.docker.com/_/php/). Debian and Alpine Linux variants are provided for popular architectures. Debian variants are recommended. -Variants for PHP 8.2 and PHP 8.3 are provided. [Browse tags](https://hub.docker.com/r/dunglas/frankenphp/tags). +Variants for PHP 8.2 and PHP 8.3 are provided. + +The tags follows this pattern: `dunglas/frankenphp/-php-` + +* `` and ` can be a major, minor or patch version, respectively of FrankenPHP and PHP. +* `` is either `bookworm` (for Debian Bookworm) or `alpine` (for the latest stable version of Alpine). + +[Browse tags](https://hub.docker.com/r/dunglas/frankenphp/tags). ## How to Use The Images