Merge pull request #2080 from dave-tucker/pkg-mk

Simplify Makefiles for Packages
This commit is contained in:
Rolf Neugebauer
2017-06-22 13:35:43 +01:00
committed by GitHub
24 changed files with 60 additions and 298 deletions

View File

@@ -1,15 +1,4 @@
.PHONY: tag push
default: push
include ../package.mk
ORG?=linuxkit
IMAGE=init
DEPS=Dockerfile init $(wildcard etc/*) $(wildcard etc/init.d/*) usermode-helper.c
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
tag: $(DEPS)
docker build --no-cache --network=none -t $(ORG)/$(IMAGE):$(HASH) .
push: tag
DOCKER_CONTENT_TRUST=1 docker pull $(ORG)/$(IMAGE):$(HASH) || \
DOCKER_CONTENT_TRUST=1 docker push $(ORG)/$(IMAGE):$(HASH)
DEPS=init usermode-helper.c $(wildcard etc/*) $(wildcard etc/init.d/*)