forked from INGInious/containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tag-registry-images.sh
executable file
·36 lines (34 loc) · 1.21 KB
/
tag-registry-images.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -e
tag="latest";
while getopts ":t:" opt; do
case $opt in
t)
echo "tag flag was triggered, Tag: $OPTARG" >&2;
tag="$OPTARG"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
read -p "Are you sure to tag grading images (ingi/ingi-c) with tag :"$tag" ? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "-------------------------------------------------------"
echo "- Tagging grading images with tag: "$tag" "
echo "-------------------------------------------------------"
docker tag ingi/inginious-c-base unjudge/inginious-c-base:"$tag"
docker tag ingi/inginious-c-default unjudge/inginious-c-default:"$tag"
docker tag unjudge/uncode-c-base unjudge/uncode-c-base:"$tag"
docker tag ingi/inginious-c-multilang unjudge/inginious-c-multilang:"$tag"
docker tag ingi/inginious-c-datascience unjudge/inginious-c-datascience:"$tag"
docker tag ingi/hdl-uncode unjudge/hdl-uncode:"$tag"
docker tag ingi/inginious-c-notebook unjudge/inginious-c-notebook:"$tag"
fi