Containerize binfmt_misc

- statically make containerd symlinks so rootfs can be read only
- run binfmt_misc in a containerd container
- ship arm, aarch64, ppc64le qemu static versions that always "just work" as this is supported in Linux 4.8

fix #53

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2016-11-29 17:40:30 +00:00
parent 1f2f77f1e9
commit 8d3691fabb
15 changed files with 390 additions and 33 deletions

View File

@@ -0,0 +1,3 @@
FROM debian:testing
RUN apt-get update && apt-get -y upgrade && apt-get install -y qemu-user-static

View File

@@ -0,0 +1,29 @@
.PHONY: tag push
BASE=debian:testing
IMAGE=qemu-user-static
default: push
hash: Dockerfile
docker pull $(BASE)
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
docker run --rm $(IMAGE):build sh -c 'apt list --installed 2>/dev/null | 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: