mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 18:41:37 +00:00
Add separate sign-tag target, keep tool building offline
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
This commit is contained in:
parent
38ad84bfbd
commit
2c4c55859f
4
Makefile
4
Makefile
@ -18,15 +18,13 @@ endif
|
|||||||
PREFIX?=/usr/local/
|
PREFIX?=/usr/local/
|
||||||
|
|
||||||
bin/moby: | bin
|
bin/moby: | bin
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull $(GO_COMPILE)
|
docker run --rm --log-driver=none $(CROSS) $(GO_COMPILE) --clone-path github.com/moby/tool --clone https://github.com/moby/tool.git --package github.com/moby/tool/cmd/moby --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o $@ > tmp_moby_bin.tar
|
||||||
DOCKER_CONTENT_TRUST=1 docker run --rm --log-driver=none $(CROSS) $(GO_COMPILE) --clone-path github.com/moby/tool --clone https://github.com/moby/tool.git --package github.com/moby/tool/cmd/moby --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o $@ > tmp_moby_bin.tar
|
|
||||||
tar xf tmp_moby_bin.tar > $@
|
tar xf tmp_moby_bin.tar > $@
|
||||||
rm tmp_moby_bin.tar
|
rm tmp_moby_bin.tar
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
LINUXKIT_DEPS=$(wildcard src/cmd/linuxkit/*.go) Makefile vendor.conf
|
LINUXKIT_DEPS=$(wildcard src/cmd/linuxkit/*.go) Makefile vendor.conf
|
||||||
bin/linuxkit: $(LINUXKIT_DEPS) | bin
|
bin/linuxkit: $(LINUXKIT_DEPS) | bin
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull $(GO_COMPILE)
|
|
||||||
tar cf - vendor -C src/cmd/linuxkit . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o $@ > tmp_linuxkit_bin.tar
|
tar cf - vendor -C src/cmd/linuxkit . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o $@ > tmp_linuxkit_bin.tar
|
||||||
tar xf tmp_linuxkit_bin.tar > $@
|
tar xf tmp_linuxkit_bin.tar > $@
|
||||||
rm tmp_linuxkit_bin.tar
|
rm tmp_linuxkit_bin.tar
|
||||||
|
@ -25,7 +25,13 @@ push: tag
|
|||||||
rm -f hash
|
rm -f hash
|
||||||
docker rmi $(IMAGE):build || true
|
docker rmi $(IMAGE):build || true
|
||||||
|
|
||||||
sign: tag
|
signed-tag: hash
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
|
(DOCKER_CONTENT_TRUST=1 docker pull $(BASE) && \
|
||||||
|
docker build --no-cache -t $(IMAGE):build . && \
|
||||||
|
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash))
|
||||||
|
|
||||||
|
sign: signed-tag
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
@ -22,7 +22,13 @@ push: tag
|
|||||||
rm -f hash
|
rm -f hash
|
||||||
docker rmi $(IMAGE):build || true
|
docker rmi $(IMAGE):build || true
|
||||||
|
|
||||||
sign: tag
|
signed-tag: hash
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
|
(DOCKER_CONTENT_TRUST=1 docker pull $(BASE) && \
|
||||||
|
docker build --no-cache -t $(IMAGE):build . && \
|
||||||
|
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash))
|
||||||
|
|
||||||
|
sign: signed-tag
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
@ -23,7 +23,13 @@ tag: hash
|
|||||||
docker rmi $(IMAGE):build
|
docker rmi $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
|
||||||
sign: tag
|
signed-tag: hash
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
|
(DOCKER_CONTENT_TRUST=1 docker pull $(BASE) && \
|
||||||
|
docker build --no-cache -t $(IMAGE):build . && \
|
||||||
|
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash))
|
||||||
|
|
||||||
|
sign: signed-tag
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
@ -23,7 +23,13 @@ tag: hash
|
|||||||
docker rmi $(IMAGE):build
|
docker rmi $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
|
||||||
sign: tag
|
signed-tag: hash
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
|
(DOCKER_CONTENT_TRUST=1 docker pull $(BASE) && \
|
||||||
|
docker build --no-cache -t $(IMAGE):build . && \
|
||||||
|
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash))
|
||||||
|
|
||||||
|
sign: signed-tag
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
@ -21,7 +21,13 @@ push: tag
|
|||||||
rm -f hash
|
rm -f hash
|
||||||
docker rmi $(IMAGE):build || true
|
docker rmi $(IMAGE):build || true
|
||||||
|
|
||||||
sign: tag
|
signed-tag: hash
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
|
(DOCKER_CONTENT_TRUST=1 docker pull $(BASE) && \
|
||||||
|
docker build --no-cache -t $(IMAGE):build . && \
|
||||||
|
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash))
|
||||||
|
|
||||||
|
sign: signed-tag
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
@ -21,7 +21,13 @@ push: tag
|
|||||||
rm -f hash
|
rm -f hash
|
||||||
docker rmi $(IMAGE):build || true
|
docker rmi $(IMAGE):build || true
|
||||||
|
|
||||||
sign: tag
|
signed-tag: hash
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
|
(DOCKER_CONTENT_TRUST=1 docker pull $(BASE) && \
|
||||||
|
docker build --no-cache -t $(IMAGE):build . && \
|
||||||
|
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash))
|
||||||
|
|
||||||
|
sign: signed-tag
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
DOCKER_CONTENT_TRUST=1 docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||||
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
DOCKER_CONTENT_TRUST=1 docker push linuxkit/$(IMAGE):$(shell cat hash)
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
Loading…
Reference in New Issue
Block a user