From 47d794ca99e40851fe63a9ace40553e48fc4d19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Thu, 3 Feb 2022 16:32:53 +0100 Subject: [PATCH] RPM: update docker build script --- redhat/docker/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/redhat/docker/build.sh b/redhat/docker/build.sh index 945ce4751..d4c1229c7 100755 --- a/redhat/docker/build.sh +++ b/redhat/docker/build.sh @@ -22,3 +22,9 @@ else echo "Saving image to '${FILE}'" ${DOCKER} image save "${IMAGE}" | pigz >"${FILE}" fi + +# Strip 'localhost/' prefix from image tag +if ! docker images | while read name tag blah; do echo "${name}:${tag}"; done | grep -q "^${IMAGE}$"; then + docker image tag "localhost/${IMAGE}" "${IMAGE}" + docker image remove "localhost/${IMAGE}" +fi