From 42b345cc6c3a9d057a429b3541ff5cd817f5f68d Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 6 Mar 2024 15:45:23 +0100 Subject: [PATCH 01/12] Remove docker image after build and push from local device --- .github/workflows/build.yaml | 1 + scripts/build_components.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9990e660..48caa69c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + pull_request: workflow_dispatch: env: diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 11ceff0a..116d9981 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -121,7 +121,9 @@ for dir in "${components_to_build[@]}"; do And validate by running: \`docker pushrm --help\` " - + + # Delete the image to get free space on device + docker rm ${full_image_name} popd done From bc8430bcd7a7f8526b16fe10570e2048e56b67ee Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 6 Mar 2024 15:56:56 +0100 Subject: [PATCH 02/12] Remove docker image after build and push from local device --- scripts/build_components.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 116d9981..27b16adc 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -110,17 +110,7 @@ for dir in "${components_to_build[@]}"; do --label org.opencontainers.image.source=https://github.com/${repo}/src/fondant/components/{BASENAME} \ . - docker pushrm ${full_image_name} | echo " - README was not pushed. - - \`docker pushrm\` might not be installed. - - To install, run: - \`wget https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_linux_amd64 -O /usr/libexec/docker/cli-plugins/docker-pushrm\` - \`chmod +x /usr/libexec/docker/cli-plugins/docker-pushrm\` - And validate by running: - \`docker pushrm --help\` - " + docker pushrm ${full_image_name} # Delete the image to get free space on device docker rm ${full_image_name} From 66592d74c0fbfccc9e1bd4168c9813e6db147eba Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 6 Mar 2024 16:03:28 +0100 Subject: [PATCH 03/12] Remove docker image after build and push from local device --- scripts/build_components.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 27b16adc..9d21275c 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -113,7 +113,7 @@ for dir in "${components_to_build[@]}"; do docker pushrm ${full_image_name} # Delete the image to get free space on device - docker rm ${full_image_name} + docker rmi ${full_image_name} popd done From d1d9e17e0538fa68c64979b7ba64a44c5f2c7758 Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 6 Mar 2024 16:07:44 +0100 Subject: [PATCH 04/12] Remove docker image after build and push from local device --- scripts/build_components.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 9d21275c..5863f4eb 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -110,10 +110,17 @@ for dir in "${components_to_build[@]}"; do --label org.opencontainers.image.source=https://github.com/${repo}/src/fondant/components/{BASENAME} \ . - docker pushrm ${full_image_name} - - # Delete the image to get free space on device - docker rmi ${full_image_name} + docker pushrm ${full_image_name} | echo " + README was not pushed. + + \`docker pushrm\` might not be installed. + + To install, run: + \`wget https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_linux_amd64 -O /usr/libexec/docker/cli-plugins/docker-pushrm\` + \`chmod +x /usr/libexec/docker/cli-plugins/docker-pushrm\` + And validate by running: + \`docker pushrm --help\` + " popd done From 65929395c485eaae1848e67e0595747ad72d98b4 Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 6 Mar 2024 16:16:24 +0100 Subject: [PATCH 05/12] Remove docker image after build and push from local device --- scripts/build_components.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 5863f4eb..f7242ece 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -121,6 +121,10 @@ for dir in "${components_to_build[@]}"; do And validate by running: \`docker pushrm --help\` " + + + # Delete old docker images to free up space + docker system prune -a --filter "until=2m" popd done From 68d7570b816f714c64ebd8f3fff4ba93a971b514 Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 6 Mar 2024 17:10:12 +0100 Subject: [PATCH 06/12] Remove docker image after build and push from local device --- scripts/build_components.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index f7242ece..7e0b13be 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -124,7 +124,8 @@ for dir in "${components_to_build[@]}"; do # Delete old docker images to free up space - docker system prune -a --filter "until=2m" + echo "Deleting old docker images to free up space ..." + echo "y" | docker system prune -a --filter "until=2m" popd done From 808af9efe2adb978562da9cc4ad66662c5e454b8 Mon Sep 17 00:00:00 2001 From: Robbe Sneyders Date: Wed, 6 Mar 2024 18:17:21 +0100 Subject: [PATCH 07/12] Update scripts/build_components.sh --- scripts/build_components.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 7e0b13be..e107e577 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -124,8 +124,7 @@ for dir in "${components_to_build[@]}"; do # Delete old docker images to free up space - echo "Deleting old docker images to free up space ..." - echo "y" | docker system prune -a --filter "until=2m" + docker rmi -f ${full_image_name} popd done From 0ab7dca48d22df2e44ed99e0a3c510e5791b6eba Mon Sep 17 00:00:00 2001 From: Robbe Sneyders Date: Wed, 6 Mar 2024 18:36:11 +0100 Subject: [PATCH 08/12] Update scripts/build_components.sh --- scripts/build_components.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index e107e577..65d5ec1b 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -124,7 +124,8 @@ for dir in "${components_to_build[@]}"; do # Delete old docker images to free up space - docker rmi -f ${full_image_name} + image_id = docker images -q ${full_image_name} + docker rmi -f ${image_id} popd done From 9bc35f17cddc7a51cc830b0500a4f921af8367b1 Mon Sep 17 00:00:00 2001 From: Robbe Sneyders Date: Wed, 6 Mar 2024 18:44:49 +0100 Subject: [PATCH 09/12] Update scripts/build_components.sh --- scripts/build_components.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 65d5ec1b..7d7fdc11 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -124,7 +124,7 @@ for dir in "${components_to_build[@]}"; do # Delete old docker images to free up space - image_id = docker images -q ${full_image_name} + image_id=$(docker images -q ${full_image_name}) docker rmi -f ${image_id} popd From 882492cdb7089350bf2a239c59f5c0808d36dd19 Mon Sep 17 00:00:00 2001 From: Robbe Sneyders Date: Wed, 6 Mar 2024 18:54:21 +0100 Subject: [PATCH 10/12] Update scripts/build_components.sh --- scripts/build_components.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 7d7fdc11..3d7dcd76 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -124,8 +124,7 @@ for dir in "${components_to_build[@]}"; do # Delete old docker images to free up space - image_id=$(docker images -q ${full_image_name}) - docker rmi -f ${image_id} + docker rmi -f $(docker images -aq) popd done From 259a743c3dccee78088754eba60ad825f0f032a4 Mon Sep 17 00:00:00 2001 From: Robbe Sneyders Date: Wed, 6 Mar 2024 19:03:46 +0100 Subject: [PATCH 11/12] Update scripts/build_components.sh --- scripts/build_components.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 3d7dcd76..705ec97c 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -124,7 +124,7 @@ for dir in "${components_to_build[@]}"; do # Delete old docker images to free up space - docker rmi -f $(docker images -aq) + docker builder prune popd done From 420dbc99084892926e49618e815e64ca9d2c6fb3 Mon Sep 17 00:00:00 2001 From: Robbe Sneyders Date: Wed, 6 Mar 2024 19:08:19 +0100 Subject: [PATCH 12/12] Update scripts/build_components.sh --- scripts/build_components.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_components.sh b/scripts/build_components.sh index 705ec97c..e7e14f16 100755 --- a/scripts/build_components.sh +++ b/scripts/build_components.sh @@ -124,7 +124,7 @@ for dir in "${components_to_build[@]}"; do # Delete old docker images to free up space - docker builder prune + docker builder prune -f popd done