-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker_init_clean
executable file
·41 lines (28 loc) · 1.09 KB
/
docker_init_clean
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
#! /bin/sh
#Stop & remove all the old
docker service rm my_compile_farm || true
docker image rm local:iglunix_abyss || true
rm image_name || true
rm iglunix_abyss.tar || true
echo "Cleaned and ready for the first/next attempt!"
#Create new modified container
docker build . --iidfile image_name --file Dockerfile_update
image_name="`cat image_name`" #This is an intermidiary image
echo "docker run starting, this may take a while"
docker run --name updated_abyss ${image_name}
echo "docker run finished"
if false
then
docker run -d -p 5000:5000 --name my_registry registry:2
echo "Created my_registry"
docker commit updated_abyss localhost:5000/iglunix_abyss
echo "Created localhost:5000:iglunix_abyss"
docker push localhost:5000/iglunix_abyss
echo "pushed localhost:5000:iglunix_abyss"
else
docker commit updated_abyss local:iglunix_abyss
docker save -o ./iglunix_abyss.tar local:iglunix_abyss
echo "Move this tar to all nodes, then \"docker load -i iglunix_abyss.tar\""
fi
#docker image rm ${image_name}
#echo "Removed intermidiary ${image_name}"