Files
linuxkit/pkg/docker-ce/Makefile
2017-05-26 14:50:49 -07:00

16 lines
370 B
Makefile

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