refined build process

This commit is contained in:
Pau Capó 2023-11-19 20:12:00 +01:00
parent 89e96f6a9d
commit 6e9c884375
6 changed files with 17 additions and 4 deletions

5
README.md Normal file
View file

@ -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
```

View file

@ -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