Redirect output of docker commands to /dev/null and use mirrored docker image.

This commit is contained in:
2020-12-23 18:42:29 +05:00
parent 41a58410f6
commit 065dd2c36c
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -28,14 +28,14 @@ function mirror() {
image_hash=$(docker images -a | grep "${image_name}" | grep "${image_version}" | awk {' print $3 '})
echo -n "${image_hash} received... "
docker tag "${image_hash}" "${REGISTRY_TO_MIRROR}/${image}"
docker tag "${image_hash}" "${REGISTRY_TO_MIRROR}/${image}" &> /dev/null
if [ $? -ne 0 ]; then
echo "FAIL"
exit
fi
echo -n "pushing... "
docker push "${REGISTRY_TO_MIRROR}/${image}"
docker push "${REGISTRY_TO_MIRROR}/${image}" &> /dev/null
if [ $? -ne 0 ]; then
echo "FAIL"
exit
@@ -43,7 +43,7 @@ function mirror() {
echo "OK"
docker image rm "${image}"
docker image rm "${image}" &> /dev/null
}
# Mirror images.