From 088ee2b4201a285bce3818edc7b7ce651ec93ba9 Mon Sep 17 00:00:00 2001 From: Daniel Draper Date: Wed, 18 Jan 2023 11:17:25 +0100 Subject: [PATCH 1/3] build multiple python version images --- .github/workflows/docker_build_push.sh | 29 +++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker_build_push.sh b/.github/workflows/docker_build_push.sh index aeac344807133..b9837f44680d9 100755 --- a/.github/workflows/docker_build_push.sh +++ b/.github/workflows/docker_build_push.sh @@ -50,12 +50,39 @@ docker build --target lean \ -t "${REPO_NAME}:${SHA}" \ -t "${REPO_NAME}:${REFSPEC}" \ -t "${REPO_NAME}:${LATEST_TAG}" \ + --build-arg PY_VER="3.8.16"\ --label "sha=${SHA}" \ --label "built_at=$(date)" \ --label "target=lean" \ --label "build_actor=${GITHUB_ACTOR}" \ . +# Build the "lean39" image +docker build --target lean \ + -t "${REPO_NAME}:${SHA}-py39" \ + -t "${REPO_NAME}:${REFSPEC}-py39" \ + -t "${REPO_NAME}:${LATEST_TAG}-py39" \ + --build-arg PY_VER="3.9.16"\ + --label "sha=${SHA}" \ + --label "built_at=$(date)" \ + --label "target=lean39" \ + --label "build_actor=${GITHUB_ACTOR}" \ + . + + +# Build the "lean310" image +docker build --target lean \ + -t "${REPO_NAME}:${SHA}-py310" \ + -t "${REPO_NAME}:${REFSPEC}-py310" \ + -t "${REPO_NAME}:${LATEST_TAG}-py310" \ + --build-arg PY_VER="3.10.9"\ + --label "sha=${SHA}" \ + --label "built_at=$(date)" \ + --label "target=lean310" \ + --label "build_actor=${GITHUB_ACTOR}" \ + . + + # # Build the "websocket" image # @@ -65,7 +92,7 @@ docker build \ -t "${REPO_NAME}:${LATEST_TAG}-websocket" \ --label "sha=${SHA}" \ --label "built_at=$(date)" \ - --label "target=lean" \ + --label "target=websocket" \ --label "build_actor=${GITHUB_ACTOR}" \ superset-websocket From 3ffff73b8068245cca95fb037f66937da9ad4655 Mon Sep 17 00:00:00 2001 From: Daniel Draper Date: Sat, 21 Jan 2023 21:48:23 +0100 Subject: [PATCH 2/3] MR review --- .github/workflows/docker_build_push.sh | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker_build_push.sh b/.github/workflows/docker_build_push.sh index b9837f44680d9..0a790b5a150e3 100755 --- a/.github/workflows/docker_build_push.sh +++ b/.github/workflows/docker_build_push.sh @@ -50,39 +50,27 @@ docker build --target lean \ -t "${REPO_NAME}:${SHA}" \ -t "${REPO_NAME}:${REFSPEC}" \ -t "${REPO_NAME}:${LATEST_TAG}" \ - --build-arg PY_VER="3.8.16"\ + --build-arg PY_VER="3.8"\ --label "sha=${SHA}" \ --label "built_at=$(date)" \ --label "target=lean" \ --label "build_actor=${GITHUB_ACTOR}" \ . +# # Build the "lean39" image +# docker build --target lean \ -t "${REPO_NAME}:${SHA}-py39" \ -t "${REPO_NAME}:${REFSPEC}-py39" \ -t "${REPO_NAME}:${LATEST_TAG}-py39" \ - --build-arg PY_VER="3.9.16"\ + --build-arg PY_VER="3.9"\ --label "sha=${SHA}" \ --label "built_at=$(date)" \ --label "target=lean39" \ --label "build_actor=${GITHUB_ACTOR}" \ . - -# Build the "lean310" image -docker build --target lean \ - -t "${REPO_NAME}:${SHA}-py310" \ - -t "${REPO_NAME}:${REFSPEC}-py310" \ - -t "${REPO_NAME}:${LATEST_TAG}-py310" \ - --build-arg PY_VER="3.10.9"\ - --label "sha=${SHA}" \ - --label "built_at=$(date)" \ - --label "target=lean310" \ - --label "build_actor=${GITHUB_ACTOR}" \ - . - - # # Build the "websocket" image # From b16d8a1e8233d7255662f904b802f8ace3b3a62c Mon Sep 17 00:00:00 2001 From: Daniel Draper Date: Sat, 21 Jan 2023 21:49:37 +0100 Subject: [PATCH 3/3] slim versions --- .github/workflows/docker_build_push.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build_push.sh b/.github/workflows/docker_build_push.sh index 0a790b5a150e3..b969813627c55 100755 --- a/.github/workflows/docker_build_push.sh +++ b/.github/workflows/docker_build_push.sh @@ -50,7 +50,7 @@ docker build --target lean \ -t "${REPO_NAME}:${SHA}" \ -t "${REPO_NAME}:${REFSPEC}" \ -t "${REPO_NAME}:${LATEST_TAG}" \ - --build-arg PY_VER="3.8"\ + --build-arg PY_VER="3.8-slim"\ --label "sha=${SHA}" \ --label "built_at=$(date)" \ --label "target=lean" \ @@ -64,7 +64,7 @@ docker build --target lean \ -t "${REPO_NAME}:${SHA}-py39" \ -t "${REPO_NAME}:${REFSPEC}-py39" \ -t "${REPO_NAME}:${LATEST_TAG}-py39" \ - --build-arg PY_VER="3.9"\ + --build-arg PY_VER="3.9-slim"\ --label "sha=${SHA}" \ --label "built_at=$(date)" \ --label "target=lean39" \