Docker: Update buildscript not to delete old images

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
Christian Franke 2018-10-18 12:07:24 +02:00
parent d9e887de2a
commit f1c0836f67

View File

@ -30,20 +30,7 @@ CDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Script begin
#
OLD_IMAGE_SHA=$( \
docker images | \
egrep "^topotests" | \
sed -r "s/( )+/ /g" | \
cut -d " " -f 3 \
)
docker build --force-rm --pull --compress -t topotests . || \
log_fatal "failed to generate topotest docker image"
if [ ! -z "$OLD_IMAGE_SHA" ]; then
log_info "Removing old topotest image"
docker rmi $OLD_IMAGE_SHA || \
log_warning "failed to remove old image"
fi
exit 0
exec docker build --pull \
--compress \
-t frrrouting/topotests \
.