From 025d79f30990bd10b46ee434037d20463d42b8a6 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Wed, 6 Dec 2023 09:41:44 +0100 Subject: [PATCH] fixed build.sh image removal in recent versions of docker the parent image is not saved as a tag when building to handle both whom has the official golang image saved and whom is using only to build, now the scripts pulls (and tags) the official image so that the rm command does not fail --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index dfe7e39..23442d1 100644 --- a/build.sh +++ b/build.sh @@ -7,6 +7,7 @@ set -e REGEX="^[ ]*(#.*)?$" while read -r VERSION; do if [[ ! "${VERSION}" =~ $REGEX ]]; then + docker pull golang:${VERSION} docker build --force-rm --build-arg GO_VERSION=${VERSION} -t bryanpedini/gobuilder:${VERSION} . docker push bryanpedini/gobuilder:${VERSION} docker image rm bryanpedini/gobuilder:${VERSION} golang:${VERSION}