From d0be7854b478f63c91a3c1e9f4b7eb486cf21620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9r=C3=B4me=20Canals?= <gerome.canals@univ-lorraine.fr> Date: Fri, 23 Aug 2024 11:03:13 +0200 Subject: [PATCH] build scripts --- php/build.local.sh | 18 ++++++++++++++++++ php/build.multi.sh | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 php/build.local.sh create mode 100755 php/build.multi.sh diff --git a/php/build.local.sh b/php/build.local.sh new file mode 100755 index 0000000..234f8b5 --- /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 0000000..8077f53 --- /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 -- GitLab