2019-06-04 17:28:26 -07:00
|
|
|
# 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
|
2019-03-08 17:12:03 -08:00
|
|
|
ARG REPO=library
|
2020-01-30 11:54:40 -08:00
|
|
|
FROM multiarch/qemu-user-static:4.2.0-2 as qemu-user-static
|
2020-01-30 15:46:05 -08:00
|
|
|
RUN touch /usr/bin/dummy
|
2020-01-30 11:54:40 -08:00
|
|
|
|
2019-03-08 17:12:03 -08:00
|
|
|
FROM ${REPO}/python:3-alpine
|
|
|
|
|
2019-06-04 17:28:26 -07:00
|
|
|
# This should be the target qemu arch
|
2019-03-08 17:12:03 -08:00
|
|
|
ARG ARCH=x86_64
|
2020-01-30 15:44:05 -08:00
|
|
|
COPY --from=qemu-user-static /usr/bin/qemu-${ARCH}-* /usr/bin/
|
2019-03-08 17:12:03 -08:00
|
|
|
|
2019-06-04 17:28:26 -07:00
|
|
|
# Everything below here is just a simple example
|
|
|
|
|
2019-03-08 17:12:03 -08:00
|
|
|
RUN echo "OK" > /foo
|
|
|
|
|
|
|
|
CMD [ "cat", "/foo" ]
|