-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_container_withTag.sh
More file actions
executable file
·45 lines (27 loc) · 1 KB
/
build_container_withTag.sh
File metadata and controls
executable file
·45 lines (27 loc) · 1 KB
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
37
38
39
40
41
42
43
44
45
#!/bin/bash
#DATE=`date -I | sed "s/-//g"`
if [ -z $1 ]; then
echo "No arguments supplied. Please, input the version tag. E.g. ./build_container_withTag.sh v0.1"
echo "Aborting"
else
echo "Building Docker image circompara2:$1, continue? [No (default); Yes]"
read input
if [[ $input == "Yes" ]]; then
echo "Start building" `date`
## copy the ccp dev dir
# mkdir -p circompara2
# rsync -avPh /home/enrico/threesum_mount/tools/circompara2/src circompara2/
# rsync -avPh /home/enrico/threesum_mount/tools/circompara2/circompara2 circompara2/
## build the docker container
docker build --build-arg INSTALL_THREADS=6 -t circompara2:$1 .
## save the built docker image
docker save -o circompara2$1.tar circompara2:$1
## deploy to threesum
rsync -a circompara2$1.tar threesum:tools/dockers/
mkdir -p old_tars
mv circompara2$1.tar old_tars
else
echo "Aborting"
fi
fi
echo "End building" `date`