Files
linuxkit/alpine/containers/binfmt/Dockerfile
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

20 lines
493 B
Docker

FROM mobylinux/alpine-build-go:78d9a136c632c66f0767e11ce3c661989d706f21
COPY *.go /go/src/binfmt/
WORKDIR /go/src/binfmt
RUN go install --ldflags '-extldflags "-fno-PIC"'
WORKDIR /rootfs
RUN mkdir -p usr/bin binfmt_misc dev etc/binfmt.d proc sys
RUN cp /go/bin/binfmt usr/bin
COPY qemu* usr/bin/
COPY 00_moby.conf etc/binfmt.d/
RUN printf 'FROM scratch\nCOPY . ./\nCMD ["/usr/bin/binfmt", "-dir", "/etc/binfmt.d/", "-mount", "/binfmt_misc"]\n' > Dockerfile
CMD ["tar", "cf", "-", "."]