Files
linuxkit/pkg/node_exporter/Makefile
2017-05-04 22:27:59 +01:00

15 lines
326 B
Makefile

.PHONY: tag push
default: push
IMAGE=node_exporter
DEPS=Dockerfile
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
tag: $(DEPS)
docker build --no-cache --network=none -t linuxkit/$(IMAGE):$(HASH) .
push: tag
docker pull linuxkit/$(IMAGE):$(HASH) || \
docker push linuxkit/$(IMAGE):$(HASH)