diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-04-08 00:00:08 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-04-08 00:00:08 +0200 |
commit | 704b9e8f63869ffe25069a57cb66f454c4f06127 (patch) | |
tree | 6bd78bc3bd7cc26cd3a5ce19aee1c2693810bb58 | |
parent | 3ce97fe80fc2d5823ce0ae2bb41f52f8c5910f95 (diff) |
Add Dockerfile for arm64 cross build
-rw-r--r-- | docker/Dockerfile.aarch64 | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64 index dc0576c..c557241 100644 --- a/docker/Dockerfile.aarch64 +++ b/docker/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM debian:stable-slim as builder +FROM multiarch/debian-debootstrap:arm64-stretch-slim as builder WORKDIR /root/ @@ -7,17 +7,22 @@ RUN apt-get -y --no-install-recommends install build-essential subversion fakero RUN git clone https://github.com/mikma/lxd-openwrt.git -RUN (cd lxd-openwrt && ./build.sh -v snapshot --type plain) +RUN (cd lxd-openwrt && ./build.sh -v snapshot -a aarch64 --type plain) RUN mkdir rootfs -RUN tar xzf /root/lxd-openwrt/bin/openwrt-snapshot-x86-64-plain.tar.gz -C rootfs +RUN tar xzf /root/lxd-openwrt/bin/openwrt-snapshot-armvirt-64-plain.tar.gz -C rootfs +ENV ROOTFS /root/rootfs +ENV LD_LIBRARY_PATH=$ROOTFS/lib +RUN mkdir -p $ROOTFS/var/lock +RUN ln -s $ROOTFS/lib/ld-musl-aarch64.so.1 /lib +RUN $ROOTFS/bin/opkg -o $ROOTFS update +RUN $ROOTFS/bin/opkg -o $ROOTFS install luci-ssl FROM scratch COPY --from=builder /root/rootfs / +#COPY --from=builder /usr/bin/qemu-aarch64-static /usr/bin COPY init.sh / -RUN mkdir -p /var/lock && opkg update && opkg install luci-ssl - ENTRYPOINT ["/init.sh"] |