mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-01 15:08:33 +00:00
Simplify Makefiles for Packages
These now inherit from a top-level package.mk Options like use of the network can be enabled on a per package basis This removes a lot of duplicate code and make the maintenace of these Makefiles much easier Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
@@ -1,15 +1,4 @@
|
||||
.PHONY: tag push
|
||||
default: push
|
||||
include ../package.mk
|
||||
|
||||
ORG?=linuxkit
|
||||
IMAGE=binfmt
|
||||
DEPS=Dockerfile Makefile main.go $(wildcard etc/binmft.d/*)
|
||||
|
||||
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=main.go $(wildcard etc/binmft.d/*)
|
||||
|
Reference in New Issue
Block a user