mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
pkg: Make Hub org/repository build time configurable
Update the Makefiles of the remaining packages. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
b2eacf0f6c
commit
d2c32e2e38
@ -4,6 +4,7 @@ SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c
|
|||||||
|
|
||||||
METADATA_BINARY=usr/bin/metadata
|
METADATA_BINARY=usr/bin/metadata
|
||||||
|
|
||||||
|
ORG?=linuxkit
|
||||||
IMAGE=metadata
|
IMAGE=metadata
|
||||||
|
|
||||||
.PHONY: tag push clean container
|
.PHONY: tag push clean container
|
||||||
@ -26,15 +27,15 @@ hash: Dockerfile $(DEPS)
|
|||||||
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
|
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
|
||||||
|
|
||||||
push: hash container
|
push: hash container
|
||||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \
|
||||||
(docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
|
(docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) && \
|
||||||
docker push linuxkit/$(IMAGE):$(shell cat hash))
|
docker push $(ORG)/$(IMAGE):$(shell cat hash))
|
||||||
docker rmi $(IMAGE):build
|
docker rmi $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
|
||||||
tag: hash container
|
tag: hash container
|
||||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \
|
||||||
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
|
docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash)
|
||||||
docker rmi $(IMAGE):build
|
docker rmi $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
.PHONY: tag push
|
.PHONY: tag push
|
||||||
default: push
|
default: push
|
||||||
|
|
||||||
|
ORG?=linuxkit
|
||||||
IMAGE=node_exporter
|
IMAGE=node_exporter
|
||||||
DEPS=Dockerfile
|
DEPS=Dockerfile
|
||||||
|
|
||||||
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
||||||
|
|
||||||
tag: $(DEPS)
|
tag: $(DEPS)
|
||||||
docker build --no-cache --network=none -t linuxkit/$(IMAGE):$(HASH) .
|
docker build --no-cache --network=none -t $(ORG)/$(IMAGE):$(HASH) .
|
||||||
|
|
||||||
push: tag
|
push: tag
|
||||||
docker pull linuxkit/$(IMAGE):$(HASH) || \
|
docker pull $(ORG)/$(IMAGE):$(HASH) || \
|
||||||
docker push linuxkit/$(IMAGE):$(HASH)
|
docker push $(ORG)/$(IMAGE):$(HASH)
|
||||||
|
@ -4,6 +4,7 @@ SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c
|
|||||||
|
|
||||||
SYSCTL_BINARY=usr/bin/sysctl
|
SYSCTL_BINARY=usr/bin/sysctl
|
||||||
|
|
||||||
|
ORG?=linuxkit
|
||||||
IMAGE=sysctl
|
IMAGE=sysctl
|
||||||
|
|
||||||
.PHONY: tag push clean container
|
.PHONY: tag push clean container
|
||||||
@ -26,15 +27,15 @@ hash: Dockerfile $(DEPS)
|
|||||||
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
|
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
|
||||||
|
|
||||||
push: hash container
|
push: hash container
|
||||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \
|
||||||
(docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
|
(docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) && \
|
||||||
docker push linuxkit/$(IMAGE):$(shell cat hash))
|
docker push $(ORG)/$(IMAGE):$(shell cat hash))
|
||||||
docker rmi $(IMAGE):build
|
docker rmi $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
|
||||||
tag: hash container
|
tag: hash container
|
||||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \
|
||||||
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
|
docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash)
|
||||||
docker rmi $(IMAGE):build
|
docker rmi $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c
|
|||||||
|
|
||||||
SYSFS_BINARY=usr/bin/sysfs
|
SYSFS_BINARY=usr/bin/sysfs
|
||||||
|
|
||||||
|
ORG?=linuxkit
|
||||||
IMAGE=sysfs
|
IMAGE=sysfs
|
||||||
|
|
||||||
.PHONY: tag push clean container
|
.PHONY: tag push clean container
|
||||||
@ -26,15 +27,15 @@ hash: Dockerfile $(DEPS)
|
|||||||
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
|
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
|
||||||
|
|
||||||
push: hash container
|
push: hash container
|
||||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \
|
||||||
(docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
|
(docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) && \
|
||||||
docker push linuxkit/$(IMAGE):$(shell cat hash))
|
docker push $(ORG)/$(IMAGE):$(shell cat hash))
|
||||||
docker rmi $(IMAGE):build
|
docker rmi $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
|
||||||
tag: hash container
|
tag: hash container
|
||||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \
|
||||||
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
|
docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash)
|
||||||
docker rmi $(IMAGE):build
|
docker rmi $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user