diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 50392f8..503d6fc 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -1,10 +1,3 @@ -FROM alpine AS builder - -# Download QEMU, see https://github.com/docker/hub-feedback/issues/1261 -ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz -RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1 - - # Original credit: https://github.com/jpetazzo/dockvpn # Smallest base image @@ -12,6 +5,8 @@ FROM arm32v7/ubuntu:18.04 LABEL maintainer="lawtancool" +COPY qemu-arm-static /usr/bin + # Testing: pamtester #RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \ # apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam google-authenticator pamtester && \ diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index 18662ab..b959781 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -1,10 +1,3 @@ -FROM alpine AS builder - -# Download QEMU, see https://github.com/docker/hub-feedback/issues/1261 -ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz -RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1 - - # Original credit: https://github.com/jpetazzo/dockvpn # Smallest base image @@ -12,6 +5,8 @@ FROM arm64v8/ubuntu:18.04 LABEL maintainer="lawtancool" +COPY qemu-arm-static /usr/bin + # Testing: pamtester #RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \ # apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam google-authenticator pamtester && \ diff --git a/hooks/post_checkout b/hooks/post_checkout new file mode 100644 index 0000000..fa25f63 --- /dev/null +++ b/hooks/post_checkout @@ -0,0 +1,3 @@ +#!/bin/bash +# downloads a local copy of qemu on docker-hub build machines +curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static .