2021-02-04 16:58:42 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
|
|
|
|
#Stop & remove all the old
|
|
|
|
docker service rm my_compile_farm || true
|
2021-02-06 12:46:14 +00:00
|
|
|
docker image rm local:iglunix_abyss || true
|
2021-02-04 16:58:42 +00:00
|
|
|
rm image_name || true
|
2021-02-06 12:46:14 +00:00
|
|
|
rm iglunix_abyss.tar || true
|
2021-02-04 16:58:42 +00:00
|
|
|
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"
|
2021-02-06 12:46:14 +00:00
|
|
|
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"
|
2021-02-04 16:58:42 +00:00
|
|
|
else
|
2021-02-06 12:46:14 +00:00
|
|
|
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\""
|
2021-02-04 16:58:42 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
#docker image rm ${image_name}
|
|
|
|
#echo "Removed intermidiary ${image_name}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|