# Build host is assumed to have "update-binfmts --enable qemu-aarch64" # First get qemu-user-static for host... FROM debian:stable-slim as host ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get --assume-yes \ install qemu-user-static # ...then build image for target with help of qemu-user-static FROM arm64v8/debian:stable-slim ENV DEBIAN_FRONTEND=noninteractive COPY --from=host /usr/bin/qemu-aarch64-static /usr/bin/ RUN apt-get update && \ apt-get --assume-yes \ --no-install-recommends \ install debootstrap \ debian-archive-keyring \ ca-certificates \ device-tree-compiler \ gcc \ make \ git \ bc \ bzip2 \ bison \ flex \ python-dev \ swig \ parted \ e2fsprogs \ dosfstools \ mtools \ pwgen && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ rm -f /var/log/*.log RUN rm /usr/bin/qemu-aarch64-static ENV PATH="/debimg/scripts:${PATH}" COPY . /debimg WORKDIR /debimg