Files
linuxkit/alpine/containers/binfmt/riddler.sh
Justin Cormack 3e6301f501 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>
2016-11-30 12:49:37 +00:00

14 lines
549 B
Bash
Executable File

#!/bin/sh
# FOR REFERENCE ONLY
# needs adjusting for real use, riddler needs some updates
set -e
printf "FROM scratch\nCOPY . ./\n" > rootfs/Dockerfile
IMAGE=$(docker build -q rootfs)
CONTAINER=$(docker create --net=none --security-opt apparmor=unconfined --cap-drop all --read-only -v /proc/sys/fs/binfmt_misc:/binfmt_misc $IMAGE /usr/bin/binfmt -dir /etc/binfmt.d/ -mount /binfmt_misc)
rm rootfs/Dockerfile
docker run -v $PWD:/conf -v /var/run/docker.sock:/var/run/docker.sock --rm jess/riddler -f -bundle /conf $CONTAINER
docker rm $CONTAINER