From 6e9c8843757c7616f5784bc68b337fe00939e854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Cap=C3=B3?= Date: Sun, 19 Nov 2023 20:12:00 +0100 Subject: [PATCH] refined build process --- README.md | 5 +++++ build.sh | 16 ++++++++++++---- php-7.4 => php-apache:7.4 | 0 php-8.0 => php-apache:8.0 | 0 php-8.1 => php-apache:8.1 | 0 php-8.2 => php-apache:8.2 | 0 6 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 README.md rename php-7.4 => php-apache:7.4 (100%) rename php-8.0 => php-apache:8.0 (100%) rename php-8.1 => php-apache:8.1 (100%) rename php-8.2 => php-apache:8.2 (100%) diff --git a/README.md b/README.md new file mode 100644 index 0000000..296e3d2 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +Only build for arm right now, based on php-apache images + +```bash +docker run -d --name container_name -v ./www:/var/www/html -v ./php:/usr/local/etc/php/conf.d git.paucapo.com/server/php-apache:8.2 +``` diff --git a/build.sh b/build.sh index 727832c..848d988 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,17 @@ #!/bin/bash +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + docker login "http://git.paucapo.com/" -for image in php-*; do - echo "Building $image" - docker build -f "./$image" -t "git.paucapo.com/server/docker:$image" . - docker push "git.paucapo.com/server/docker:$image" +for dockerfile in $SCRIPT_DIR/*:*; do + package=`basename "$dockerfile"` + echo "Building $package" + docker build \ + -f "$dockerfile" \ + -t "git.paucapo.com/server/$package" \ + "$SCRIPT_DIR" + docker push "git.paucapo.com/server/$package" done + +sudo docker image prune -a --force diff --git a/php-7.4 b/php-apache:7.4 similarity index 100% rename from php-7.4 rename to php-apache:7.4 diff --git a/php-8.0 b/php-apache:8.0 similarity index 100% rename from php-8.0 rename to php-apache:8.0 diff --git a/php-8.1 b/php-apache:8.1 similarity index 100% rename from php-8.1 rename to php-apache:8.1 diff --git a/php-8.2 b/php-apache:8.2 similarity index 100% rename from php-8.2 rename to php-apache:8.2