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
This commit is contained in:
Hemant Kumar 2017-08-17 15:23:04 +05:30 committed by Tobias Schmidt
parent 4b011bfe44
commit de08e38c5e
2 changed files with 14 additions and 2 deletions

7
Dockerfile.ppc64le Normal file
View File

@ -0,0 +1,7 @@
FROM ppc64le/busybox:glibc
COPY node_exporter /bin/node_exporter
EXPOSE 9100
USER nobody
ENTRYPOINT [ "/bin/node_exporter" ]

View File

@ -22,6 +22,8 @@ PREFIX ?= $(shell pwd)
BIN_DIR ?= $(shell pwd)
DOCKER_IMAGE_NAME ?= node-exporter
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))
MACH ?= $(shell uname -m)
DOCKERFILE ?= Dockerfile
ifeq ($(OS),Windows_NT)
OS_detected := Windows
@ -77,8 +79,11 @@ tarball: $(PROMU)
@$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
docker:
@echo ">> building docker image"
@docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .
ifeq ($(MACH), ppc64le)
$(eval DOCKERFILE=Dockerfile.ppc64le)
endif
@echo ">> building docker image from $(DOCKERFILE)"
@docker build --file $(DOCKERFILE) -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .
test-docker:
@echo ">> testing docker image"