This commit is contained in:
parent
d3de64456c
commit
e33de4262e
14
.drone.yml
14
.drone.yml
@ -2,15 +2,10 @@ kind: pipeline
|
|||||||
name: amd64
|
name: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: qemu
|
- name: Get 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
|
|
||||||
image: busybox
|
image: busybox
|
||||||
commands:
|
commands:
|
||||||
- tar -xvf x86_64_qemu-x86_64-static.tar.gz
|
- make build/qemu-x86_64-static
|
||||||
- rm x86_64_qemu-x86_64-static.tar.gz
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
@ -28,6 +23,11 @@ kind: pipeline
|
|||||||
name: arm
|
name: arm
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get qemu
|
||||||
|
image: busybox
|
||||||
|
commands:
|
||||||
|
- make build/qemu-arm-static
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
|
11
Dockerfile
11
Dockerfile
@ -2,18 +2,9 @@ ARG REPO=library
|
|||||||
FROM ${REPO}/python:3-alpine
|
FROM ${REPO}/python:3-alpine
|
||||||
|
|
||||||
ARG ARCH=x86_64
|
ARG ARCH=x86_64
|
||||||
ARG HOST_ARCH=x86_64
|
|
||||||
|
|
||||||
ARG QEMU_VERSION=v2.9.1-1
|
COPY ./build/qemu-${ARCH}-static /usr/bin/
|
||||||
|
|
||||||
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/ ; \
|
|
||||||
}
|
|
||||||
|
|
||||||
RUN echo "OK" > /foo
|
RUN echo "OK" > /foo
|
||||||
|
|
||||||
|
|
||||||
CMD [ "cat", "/foo" ]
|
CMD [ "cat", "/foo" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user