This commit is contained in:
parent
efb29fc022
commit
aed73fe158
22
Dockerfile
22
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user