Add some documentation
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
IamTheFij 2019-06-04 17:28:26 -07:00
parent 51323bdde3
commit ec9a12a983
3 changed files with 12 additions and 1 deletions

View File

@ -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 ARG REPO=library
FROM ${REPO}/python:3-alpine FROM ${REPO}/python:3-alpine
# This should be the target qemu arch
ARG ARCH=x86_64 ARG ARCH=x86_64
COPY ./build/qemu-${ARCH}-static /usr/bin/ COPY ./build/qemu-${ARCH}-static /usr/bin/
# Everything below here is just a simple example
RUN echo "OK" > /foo RUN echo "OK" > /foo
CMD [ "cat", "/foo" ] CMD [ "cat", "/foo" ]

5
Readme.md Normal file
View 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.

View File

@ -6,6 +6,7 @@ VERSION=v2.9.1-1
mkdir -p build mkdir -p build
cd 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 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 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 tar -xvf ${HOST_ARCH}_qemu-${target_arch}-static.tar.gz