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
This commit is contained in:
parent
04f6f8372c
commit
025d79f309
1
build.sh
1
build.sh
@ -7,6 +7,7 @@ set -e
|
|||||||
REGEX="^[ ]*(#.*)?$"
|
REGEX="^[ ]*(#.*)?$"
|
||||||
while read -r VERSION; do
|
while read -r VERSION; do
|
||||||
if [[ ! "${VERSION}" =~ $REGEX ]]; then
|
if [[ ! "${VERSION}" =~ $REGEX ]]; then
|
||||||
|
docker pull golang:${VERSION}
|
||||||
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t bryanpedini/gobuilder:${VERSION} .
|
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t bryanpedini/gobuilder:${VERSION} .
|
||||||
docker push bryanpedini/gobuilder:${VERSION}
|
docker push bryanpedini/gobuilder:${VERSION}
|
||||||
docker image rm bryanpedini/gobuilder:${VERSION} golang:${VERSION}
|
docker image rm bryanpedini/gobuilder:${VERSION} golang:${VERSION}
|
||||||
|
Loading…
Reference in New Issue
Block a user