mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-08-23 17:18:22 +00:00
23 lines
835 B
Docker
23 lines
835 B
Docker
# Use Debian stretch until https://bugs.alpinelinux.org/issues/8131 is resolved.
|
|
FROM debian@sha256:de3eac83cd481c04c5d6c7344cd7327625a1d8b2540e82a8231b5675cef0ae5f AS qemu
|
|
RUN apt-get update && apt-get install -y qemu-user-static && \
|
|
mv /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64 && \
|
|
mv /usr/bin/qemu-arm-static /usr/bin/qemu-arm && \
|
|
mv /usr/bin/qemu-ppc64le-static /usr/bin/qemu-ppc64le
|
|
|
|
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
|
|
|
|
RUN apk add --no-cache go musl-dev
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
|
|
|
COPY main.go /go/src/binfmt/
|
|
RUN go-compile.sh /go/src/binfmt
|
|
|
|
FROM scratch
|
|
ENTRYPOINT []
|
|
WORKDIR /
|
|
COPY --from=qemu usr/bin/qemu-* usr/bin/
|
|
COPY --from=mirror /go/bin/binfmt usr/bin/binfmt
|
|
COPY etc/binfmt.d/00_linuxkit.conf etc/binfmt.d/00_linuxkit.conf
|
|
CMD ["/usr/bin/binfmt"]
|