summaryrefslogtreecommitdiffstats
path: root/redhat/docker/build.sh
diff options
context:
space:
mode:
authorFrançois Andriot <[email protected]>2022-02-03 16:32:53 +0100
committerFrançois Andriot <[email protected]>2022-02-03 16:51:36 +0100
commit47d794ca99e40851fe63a9ace40553e48fc4d19b (patch)
tree39d7bbcc2039464306a458d702bc5bcb7d7677bd /redhat/docker/build.sh
parent20f4adb3d30c07a251175bd6bf9c4b0dfeb4125c (diff)
downloadtde-packaging-47d794ca99e40851fe63a9ace40553e48fc4d19b.tar.gz
tde-packaging-47d794ca99e40851fe63a9ace40553e48fc4d19b.zip
RPM: update docker build script
Diffstat (limited to 'redhat/docker/build.sh')
-rwxr-xr-xredhat/docker/build.sh6
1 files changed, 6 insertions, 0 deletions
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