Clear leftover copies of docker images in Vagrant
@@ -53,10 +53,10 @@ vagrant-%-load-images:
@if [ -e "scripts/vagrant/images/$*.tar" ]; then \
cd scripts/vagrant; \
echo "Loading image $*.tar to master"; \
- vagrant ssh master -c "sudo docker load -i /vagrant/images/$*.tar" > /dev/null 2>&1; \
+ vagrant ssh master -c "sudo docker rmi networkservicemesh/$* -f && docker load -i /vagrant/images/$*.tar" > /dev/null 2>&1; \
number=1 ; while [[ $$number -le ${WORKER_COUNT} ]] ; do \
echo "Loading image $*.tar to worker$$number"; \
- vagrant ssh worker$$number -c "sudo docker load -i /vagrant/images/$*.tar" ; \
+ vagrant ssh worker$$number -c "sudo docker rmi networkservicemesh/$* -f && docker load -i /vagrant/images/$*.tar" > /dev/null 2>&1; \
((number++)) ; \
done; \
else \
