From ec9a12a983eefa9a2360aa0cfd1f867a89b2f7b7 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 4 Jun 2019 17:28:26 -0700 Subject: [PATCH] Add some documentation --- Dockerfile | 7 ++++++- Readme.md | 5 +++++ get_qemu.sh | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Readme.md diff --git a/Dockerfile b/Dockerfile index c6084ff..74da2c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ] diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..2316653 --- /dev/null +++ b/Readme.md @@ -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. diff --git a/get_qemu.sh b/get_qemu.sh index 9ea3b81..880669c 100755 --- a/get_qemu.sh +++ b/get_qemu.sh @@ -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