summaryrefslogtreecommitdiffstats
path: root/ci/docker/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'ci/docker/Makefile')
-rw-r--r--ci/docker/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/ci/docker/Makefile b/ci/docker/Makefile
new file mode 100644
index 000000000..81189960d
--- /dev/null
+++ b/ci/docker/Makefile
@@ -0,0 +1,27 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+SHELL = /bin/bash
+
+IMAGE = opnfv/yardstick-ci
+
+.PHONY: all
+all: .docker
+
+.docker:
+ /usr/bin/docker build --rm=true --no-cache=true -t $(IMAGE):14.04 yardstick-ci
+ /usr/bin/docker tag -f $(IMAGE):14.04 $(IMAGE)
+ touch .docker
+
+.PHONY: clean
+clean:
+ docker ps | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker stop
+ docker ps -a | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker rm
+ docker images -a | grep $(IMAGE) | awk '{print $$3}' | sort | uniq | xargs -r docker rmi
+ rm -f .docker