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