Consolidate
continuous-integration/drone/push Build is passing Details

This commit is contained in:
IamTheFij 2020-01-30 16:14:51 -08:00
parent efb29fc022
commit aed73fe158
1 changed files with 6 additions and 16 deletions

View File

@ -4,27 +4,17 @@
ARG REPO=library
FROM multiarch/qemu-user-static:4.2.0-2 as qemu-user-static
# Try in a new dir
RUN mkdir /qemu
RUN touch /qemu/qemu-x86_64-dummy
RUN cp /usr/bin/qemu-* /qemu/
RUN ls -al /qemu
# What's going on here? Why does the dir go away?
RUN ls -al /usr/bin
RUN echo "" > /usr/bin/dummy
RUN ls -al /usr/bin
# How about bin?
RUN ls -al /bin
RUN echo "" > /bin/dummy
RUN ls -al /bin
# On some systems, touching a dummy file in the /usr/bin dir doesn't work
# and instead removes all files previously in the directory. Not sure why
# this is happening. Moving everything to a different directory seems to
# work fine though.
RUN mkdir /qemu && touch /qemu/qemu-x86_64-dummy && cp /usr/bin/qemu-* /qemu/
FROM ${REPO}/python:3-alpine
# This should be the target qemu arch
ARG ARCH=x86_64
COPY --from=qemu-user-static /usr/bin/qemu-${ARCH}-* /usr/bin/
COPY --from=qemu-user-static /qemu/qemu-${ARCH}-* /usr/bin/
# Everything below here is just a simple example