Update herokuish base image on updates using --pull

Herokuish update fails if existing herokuish is used by other containers,
using docker build --pull will force to update also the base image.

Setting up herokuish (0.3.28) ...
Removing old herokuish image
Failed to remove image (gliderlabs/herokuish): Error response from daemon: conflict: unable to remove repository reference "gliderlabs/herokuish" (must force) - container dbf2298ab5a5 is using its referenced image 7d4a8d661476
Importing herokuish into docker (around 5 minutes)
This commit is contained in:
Edgars Beigarts committed 2017-04-27 12:39:12 +03:00
1 parent cc08da9600
commit d468572bf7
2 files changed
+2 -13

No files matched your search

+1 -7
View File
@@ -7,14 +7,8 @@ main() {
sleep 5
count=$(sudo docker images | grep -c gliderlabs/herokuish)
if [ "$count" -ne 0 ]; then
echo 'Removing old herokuish image'
sudo docker rmi gliderlabs/herokuish
fi
echo 'Importing herokuish into docker (around 5 minutes)'
sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null
sudo docker build --pull -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null
}
main