This commit is contained in:
parent
d3de64456c
commit
e33de4262e
14
.drone.yml
14
.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:
|
||||
|
11
Dockerfile
11
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" ]
|
||||
|
Loading…
Reference in New Issue
Block a user