This commit is contained in:
parent
51323bdde3
commit
ec9a12a983
@ -1,10 +1,15 @@
|
||||
# First build arg is to ensure pulling the image from the correct repository
|
||||
# The following will work with any library image that supports multi-arch
|
||||
# Other repositories may use tag suffix instead
|
||||
ARG REPO=library
|
||||
FROM ${REPO}/python:3-alpine
|
||||
|
||||
# This should be the target qemu arch
|
||||
ARG ARCH=x86_64
|
||||
|
||||
COPY ./build/qemu-${ARCH}-static /usr/bin/
|
||||
|
||||
# Everything below here is just a simple example
|
||||
|
||||
RUN echo "OK" > /foo
|
||||
|
||||
CMD [ "cat", "/foo" ]
|
||||
|
5
Readme.md
Normal file
5
Readme.md
Normal file
@ -0,0 +1,5 @@
|
||||
# multiarch-pipeline-test
|
||||
|
||||
This is a test repo that serves as an example of publishing multi-arch Docker builds with Drone.
|
||||
|
||||
Some comments exist inline in the included files and more robust documentation is forthcoming.
|
@ -6,6 +6,7 @@ VERSION=v2.9.1-1
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# Multiple args can be passed in, but in most cases (Makefile and .drone.yml) we only use one at a time
|
||||
for target_arch in $*; do
|
||||
wget -N https://github.com/multiarch/qemu-user-static/releases/download/$VERSION/${HOST_ARCH}_qemu-${target_arch}-static.tar.gz
|
||||
tar -xvf ${HOST_ARCH}_qemu-${target_arch}-static.tar.gz
|
||||
|
Loading…
Reference in New Issue
Block a user