mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-30 23:20:44 +00:00
The ebpf packages were somewhat neglected during the restructuring of the the repository and currently do not build. They were also a little awkward to use. So move them to ./projects for now until it matures. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
30 lines
794 B
Makefile
30 lines
794 B
Makefile
.PHONY: tag push
|
|
|
|
BASE=alpine:3.5
|
|
IMAGE=alpine-build-ebpf
|
|
|
|
default: push
|
|
|
|
hash: Dockerfile *.patch cdefs.h error.h
|
|
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
|
docker run --rm $(IMAGE):build sh -c 'cat /Dockerfile /build/*.patch /build/*.h /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
|
|
|
push: hash
|
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
|
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
tag: hash
|
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
clean:
|
|
rm -f hash
|
|
|
|
.DELETE_ON_ERROR:
|