1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
12 IMAGE = opnfv/yardstick
14 DOCKER_TAG = brahmaputra.0
20 /usr/bin/docker build --rm=true --no-cache=true -t $(IMAGE):$(DOCKER_TAG) yardstick-ci
21 /usr/bin/docker tag -f $(IMAGE):$(DOCKER_TAG) $(IMAGE):latest
27 @docker ps | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker stop
28 @docker ps -a | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker rm
29 @echo "Docker images to remove:"
30 @docker images | head -1 && docker images | grep $(IMAGE) || true
31 @image_tags=($$(docker images | grep $(IMAGE) | awk '{print $$2}')) ; \
32 for tag in "$${image_tags[@]}"; do \
33 echo "Removing docker image $(IMAGE):$$tag..." ; \
34 docker rmi $(IMAGE):$$tag ; \