From e33de4262e68e11e57b5aac0ab63fe0a014d2094 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Sun, 10 Mar 2019 15:14:56 -0700 Subject: [PATCH] Try make target --- .drone.yml | 14 +++++++------- Dockerfile | 11 +---------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8f876e1..7840f4a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,15 +2,10 @@ kind: pipeline name: amd64 steps: - - name: qemu - image: plugins/download - source: https://github.com/multiarch/qemu-user-static/releases/download/v2.9.1-1/x86_64_qemu-x86_64-static.tar.gz - - - name: prep + - name: Get qemu image: busybox commands: - - tar -xvf x86_64_qemu-x86_64-static.tar.gz - - rm x86_64_qemu-x86_64-static.tar.gz + - make build/qemu-x86_64-static - name: build image: plugins/docker @@ -28,6 +23,11 @@ kind: pipeline name: arm steps: + - name: Get qemu + image: busybox + commands: + - make build/qemu-arm-static + - name: build image: plugins/docker settings: diff --git a/Dockerfile b/Dockerfile index d22e416..c6084ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,18 +2,9 @@ ARG REPO=library FROM ${REPO}/python:3-alpine ARG ARCH=x86_64 -ARG HOST_ARCH=x86_64 -ARG QEMU_VERSION=v2.9.1-1 - -RUN [ $ARCH == $HOST_ARCH ] || { \ - wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/${HOST_ARCH}_qemu-${ARCH}-static.tar.gz && \ - tar -xvf ${HOST_ARCH}_qemu-${ARCH}-static.tar.gz && \ - rm ${HOST_ARCH}_qemu-${ARCH}-static.tar.gz && \ - mv qemu-${ARCH}-static /usr/bin/ ; \ - } +COPY ./build/qemu-${ARCH}-static /usr/bin/ RUN echo "OK" > /foo - CMD [ "cat", "/foo" ]