Ajout de l'option --push-image dans le script du build pour pouvoir publier l'image.

This commit is contained in:
2026-06-27 12:05:20 +02:00
parent 57d05cc85d
commit c644754679
2 changed files with 10 additions and 1 deletions
+1
View File
@@ -28,5 +28,6 @@ Exemple :
| -------------- | ------------------------------------------------------ |
| `--debug` | Affiche la commande de construction de l'image. |
| `--build` | Exécute la construction de l'image Docker. |
| `--push-image` | Push de l'image dans le Registry Docker. |
| `--apache` | Utilise une image Apache. |
| `--frankenphp` | Utilise une image FrankenPHP. |
+9 -1
View File
@@ -13,10 +13,10 @@ serverVersion=""
serverName=""
withDebug=false
withBuild=false
withPushImage=false
withApacheOption=false
withFrankenphpOption=false
for arg in "$@"; do
case "$arg" in
--debug)
@@ -25,6 +25,9 @@ for arg in "$@"; do
--build)
withBuild=true
;;
--push-image)
withPushImage=true
;;
--apache)
withApacheOption=true
;;
@@ -119,3 +122,8 @@ if [[ "$withBuild" == "true" ]]; then
eval "$buildCommand"
echo "Build de l'image ${phpVersion}-${serverName,,}-${serverVersion} terminé."
fi
if [[ "$withPushImage" == "true" ]]; then
docker push $dockerImageTag
echo "Push du tag $dockerImageTag."
fi