diff --git a/services/backup/Dockerfile b/services/backup/Dockerfile --- a/services/backup/Dockerfile +++ b/services/backup/Dockerfile @@ -1,4 +1,4 @@ -FROM commapp/services-base:1.1 +FROM commapp/services-base:1.2 RUN apt-get update && \ apt-get install -y uuid-dev && \ diff --git a/services/blob/Dockerfile b/services/blob/Dockerfile --- a/services/blob/Dockerfile +++ b/services/blob/Dockerfile @@ -1,4 +1,4 @@ -FROM commapp/services-base:1.1 +FROM commapp/services-base:1.2 RUN apt-get update && \ apt-get install -y uuid-dev && \ diff --git a/services/scripts/build_base_image.sh b/services/scripts/build_base_image.sh --- a/services/scripts/build_base_image.sh +++ b/services/scripts/build_base_image.sh @@ -7,5 +7,24 @@ exit 1 fi -tag=${1:-"1.1"} -docker build -t commapp/services-base:"${tag}" base-image + +tag=${1:-"1.2"} + +BUILDER_NAME="COMM_BUILDER" + +BUILDER_PRESENT=$(docker buildx inspect "$BUILDER_NAME" 2> /dev/null || echo "") + +if [[ -z "${BUILDER_PRESENT}" ]]; then + echo "builder not found, creating builder $BUILDER_NAME"; + docker buildx create --name "$BUILDER_NAME" +fi; + +docker buildx use "$BUILDER_NAME" + +# use --push to automatically push this image to the hub +docker buildx build \ + --tag commapp/services-base:"${tag}" \ + -o type=image \ + --platform=linux/arm64,linux/amd64 \ + # --push \ + base-image/. diff --git a/services/tunnelbroker/Dockerfile b/services/tunnelbroker/Dockerfile --- a/services/tunnelbroker/Dockerfile +++ b/services/tunnelbroker/Dockerfile @@ -1,4 +1,4 @@ -FROM commapp/services-base:1.1 +FROM commapp/services-base:1.2 ARG MAKE_JOBS=4 ENV MAKEFLAGS="-j${MAKE_JOBS}"