mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-13 20:06:38 +00:00
- 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>
14 lines
549 B
Bash
Executable File
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
|