From aed73fe1583d863796b4d1f41fc719904a28de32 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Thu, 30 Jan 2020 16:14:51 -0800 Subject: [PATCH] Consolidate --- Dockerfile | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 24f2f0f..73f5d58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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