From 7920cdfc6f5676a1028d67cd92aac129b8204f80 Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Date: Wed, 18 Jan 2023 10:55:28 +0000 Subject: [PATCH 1/2] feat: multi arch build script --- CODEOWNERS | 2 +- build-image | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 build-image diff --git a/CODEOWNERS b/CODEOWNERS index 9ac848a..5737d69 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @bvis @joskfg @rccrdpccl @akira28 \ No newline at end of file +* @bvis @joskfg \ No newline at end of file diff --git a/build-image b/build-image new file mode 100755 index 0000000..2ad8237 --- /dev/null +++ b/build-image @@ -0,0 +1,24 @@ +#/bin/bash + +if [ $# -lt 1 ] + then + echo "$0 " + echo "Example: $0 1.19.1" + echo "Example: $0 1.19.1 1" + exit 1 +fi + +nginxVersion=$1 +imageTag=$([ -z "$2" ] && echo "$nginxVersion" || echo "$nginxVersion-$2") + +docker buildx create --name nginx-vts-builder --driver docker-container --bootstrap 2> /dev/null || true +docker buildx use nginx-vts-builder + +docker buildx build \ + --pull \ + --push \ + --build-arg VERSION=$nginxVersion \ + . \ + --platform linux/arm64,linux/amd64 \ + -t softonic/nginx-vts/$imageTag \ + -t softonic/nginx-vts:latest From c13c1d96dd54c15d6219c7ca585a747e5ade0f0a Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Date: Mon, 23 Jan 2023 15:59:18 +0000 Subject: [PATCH 2/2] fix: image name --- build-image | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-image b/build-image index 2ad8237..641ef37 100755 --- a/build-image +++ b/build-image @@ -20,5 +20,5 @@ docker buildx build \ --build-arg VERSION=$nginxVersion \ . \ --platform linux/arm64,linux/amd64 \ - -t softonic/nginx-vts/$imageTag \ + -t softonic/nginx-vts:$imageTag \ -t softonic/nginx-vts:latest