mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-25 21:53:06 +00:00
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>
18 lines
447 B
Makefile
18 lines
447 B
Makefile
.PHONY: tag push
|
|
default: push
|
|
|
|
ORG?=linuxkit
|
|
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
|
BASE_DEPS=Dockerfile Makefile
|
|
|
|
tag: $(BASE_DEPS) $(DEPS)
|
|
ifndef $(NETWORK)
|
|
docker build -t $(ORG)/$(IMAGE):$(HASH) .
|
|
else
|
|
docker build --network=none -t $(ORG)/$(IMAGE):$(HASH) .
|
|
endif
|
|
|
|
push: tag
|
|
DOCKER_CONTENT_TRUST=1 docker pull $(ORG)/$(IMAGE):$(HASH) || \
|
|
DOCKER_CONTENT_TRUST=1 docker push $(ORG)/$(IMAGE):$(HASH)
|