diff --git a/php/build.local.sh b/php/build.local.sh new file mode 100755 index 0000000000000000000000000000000000000000..234f8b5cd1ed3700c72ab3a4edc3dd4ce19b4b10 --- /dev/null +++ b/php/build.local.sh @@ -0,0 +1,18 @@ +#!/bin/bash +#docker buildx create --name multibuild --driver=docker-container + +if [ $# -eq 0 ]; then + echo "Usage: $0 tag" + exit 1 +fi +if [ $# -eq 1 ]; then + echo "docker build -t canals/php:$1 ./$1/ " + docker build -t canals/php:$1 ./$1/ +fi + +if [ $# -eq 2 ]; then + echo "docker build -t canals/php:$1 -t canals/php:$2 ./$1/" + docker build -t canals/php:$1 -t canals/php:$2 ./$1/ + + +fi diff --git a/php/build.multi.sh b/php/build.multi.sh new file mode 100755 index 0000000000000000000000000000000000000000..8077f5328228631fbc2762a529b53b615b881c22 --- /dev/null +++ b/php/build.multi.sh @@ -0,0 +1,18 @@ +#!/bin/bash +#docker buildx create --name multibuild --driver=docker-container + +if [ $# -eq 0 ]; then + echo "Usage: $0 tag" + exit 1 +fi +if [ $# -eq 1 ]; then + echo "docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v8 -t canals/php:$1 ./$1/ --builder=multibuild --push" + docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v8 -t canals/php:$1 ./$1/ --builder=multibuild --push +fi + +if [ $# -eq 2 ]; then + echo "docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v8 -t canals/php:$1 -t canals/php:$2 ./$1/ --builder=multibuild --push" + docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v8 -t canals/php:$1 -t canals/php:$2 ./$1/ --builder=multibuild --push + + +fi