You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/01/24 17:52:18 UTC
(superset) branch improve_docker_tags created (now fdf515cd7d)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a change to branch improve_docker_tags
in repository https://gitbox.apache.org/repos/asf/superset.git
at fdf515cd7d fix(docker): improve docker tags to be cleared and avoid conflicts
This branch includes the following new commits:
new fdf515cd7d fix(docker): improve docker tags to be cleared and avoid conflicts
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix(docker): improve docker tags to be cleared and avoid conflicts
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch improve_docker_tags
in repository https://gitbox.apache.org/repos/asf/superset.git
commit fdf515cd7d4dfbcef994f6ab3cf033332a64b842
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed Jan 24 09:51:18 2024 -0800
fix(docker): improve docker tags to be cleared and avoid conflicts
---
scripts/docker_build_push.sh | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/scripts/docker_build_push.sh b/scripts/docker_build_push.sh
index 5ad7d2d999..24a5839157 100755
--- a/scripts/docker_build_push.sh
+++ b/scripts/docker_build_push.sh
@@ -70,32 +70,38 @@ fi
BUILD_ARG="3.9-slim-bookworm"
-# Replace '/' with '-' in BUILD_PLATFORM
-SAFE_BUILD_PLATFORM=$(echo "${BUILD_PLATFORM}" | sed 's/\//-/g')
+# Replace 'linux/amd64' with 'amd' and 'linux/arm64' with 'arm'
+SAFE_BUILD_PLATFORM=$(echo "${BUILD_PLATFORM}" | sed -e 's/linux\/amd64/amd/' -e 's/linux\/arm64/arm/')
+
+PLATFORM_SUFFIX=""
+if [[ "${BUILD_PLATFORM}" == "linux/arm64" ]]; then
+ PLATFORM_SUFFIX="-arm"
+fi
+
MAIN_UNIQUE_TAG="${REPO_NAME}:${SHA}-${TARGET}-${SAFE_BUILD_PLATFORM}-${BUILD_ARG}"
case "${TARGET}" in
"dev")
- DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${SHA}-dev -t ${REPO_NAME}:${REFSPEC}-dev -t ${DEV_TAG}"
+ TAG_SUFFIX="-dev"
BUILD_TARGET="dev"
;;
"lean")
- DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${SHA} -t ${REPO_NAME}:${REFSPEC} -t ${REPO_NAME}:${LATEST_TAG}"
+ TAG_SUFFIX=""
BUILD_TARGET="lean"
;;
"lean310")
- DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${SHA}-py310 -t ${REPO_NAME}:${REFSPEC}-py310 -t ${REPO_NAME}:${LATEST_TAG}-py310"
BUILD_TARGET="lean"
+ TAG_SUFFIX="-py310"
BUILD_ARG="3.10-slim-bookworm"
;;
"websocket")
- DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${SHA}-websocket -t ${REPO_NAME}:${REFSPEC}-websocket -t ${REPO_NAME}:${LATEST_TAG}-websocket"
BUILD_TARGET=""
+ TAG_SUFFIX="-websocket"
DOCKER_CONTEXT="superset-websocket"
;;
"dockerize")
- DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:dockerize"
BUILD_TARGET=""
+ TAG_SUFFIX="-dockerize"
DOCKER_CONTEXT="-f dockerize.Dockerfile ."
;;
*)
@@ -103,6 +109,7 @@ case "${TARGET}" in
exit 1
;;
esac
+DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${TAG_SUFFIX}${PLATFORM_SUFFIX} -t ${REPO_NAME}:${SHA}${TAG_SUFFIX}${PLATFORM_SUFFIX} -t ${REPO_NAME}:${REFSPEC}${TAG_SUFFIX}${PLATFORM_SUFFIX} -t ${REPO_NAME}:${LATEST_TAG}${TAG_SUFFIX}${PLATFORM_SUFFIX}"
cat<<EOF
Rolling with tags: