Files
linuxkit/pkg/containerd/Makefile
Justin Cormack e79e3a38ad Use containerd to run containers
Because we are not yet using the image store, this requires a
patched `ctr` that can run a specified rootfs rather than an
image.

We will switch to the image store later, but this requires
extensive build changes.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-14 15:35:29 -05:00

34 lines
951 B
Makefile

SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
.PHONY: tag push
BASE=golang:1.8-alpine
IMAGE=containerd
default: push
hash: Dockerfile etc/containerd/config.toml
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
tar cf - $^ | docker build --no-cache -t $(IMAGE):build0 -
docker run --rm $(IMAGE):build0 | docker build --no-cache -t $(IMAGE):build -
docker rmi $(IMAGE):build0
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > $@
push: hash
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
docker push linuxkit/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build
rm -f hash
tag: hash
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build
rm -f hash
clean:
rm -f hash
.DELETE_ON_ERROR: