aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHemant Kumar <hemant@linux.vnet.ibm.com>2017-08-17 15:23:04 +0530
committerTobias Schmidt <tobidt@gmail.com>2017-08-17 11:53:04 +0200
commitde08e38c5ec321d879fc3b26917263b779ed776e (patch)
tree2ec84f91a4908cd40a7e34174446d3c832110995 /Makefile
parent4b011bfe44658d5c23650834c8ae56796b4d5c59 (diff)
downloadprometheus_node_collector-de08e38c5ec321d879fc3b26917263b779ed776e.tar.bz2
prometheus_node_collector-de08e38c5ec321d879fc3b26917263b779ed776e.tar.xz
prometheus_node_collector-de08e38c5ec321d879fc3b26917263b779ed776e.zip
Add dockerfile for ppc64le (#638)
* Add dockerfile for ppc64le and related changes * Pass the fill file as DOCKEFILE * Add the dockerfile name to build msg
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index deea054..8ef57c0 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,8 @@ PREFIX ?= $(shell pwd)
22BIN_DIR ?= $(shell pwd) 22BIN_DIR ?= $(shell pwd)
23DOCKER_IMAGE_NAME ?= node-exporter 23DOCKER_IMAGE_NAME ?= node-exporter
24DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) 24DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))
25MACH ?= $(shell uname -m)
26DOCKERFILE ?= Dockerfile
25 27
26ifeq ($(OS),Windows_NT) 28ifeq ($(OS),Windows_NT)
27 OS_detected := Windows 29 OS_detected := Windows
@@ -77,8 +79,11 @@ tarball: $(PROMU)
77 @$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR) 79 @$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
78 80
79docker: 81docker:
80 @echo ">> building docker image" 82ifeq ($(MACH), ppc64le)
81 @docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" . 83 $(eval DOCKERFILE=Dockerfile.ppc64le)
84endif
85 @echo ">> building docker image from $(DOCKERFILE)"
86 @docker build --file $(DOCKERFILE) -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .
82 87
83test-docker: 88test-docker:
84 @echo ">> testing docker image" 89 @echo ">> testing docker image"