| 1 |
# if TARGETARCH is defined, we'l pull the x86_64 image |
| 2 |
FROM registry.fedoraproject.org/fedora-minimal:44${TARGETARCH:+-x86_64} AS amd64 |
| 3 |
# if TARGETARCH is defined, we'l pull the aarch64 image |
| 4 |
FROM registry.fedoraproject.org/fedora-minimal:44${TARGETARCH:+-aarch64} AS arm64 |
| 5 |
|
| 6 |
# run "file" against both shared libraries |
| 7 |
FROM registry.fedoraproject.org/fedora-minimal AS native |
| 8 |
COPY --from=amd64 /lib64/libc.so.6 /libc-amd64 |
| 9 |
COPY --from=arm64 /lib64/libc.so.6 /libc-arm64 |
| 10 |
RUN microdnf -y install file && microdnf -y clean all |
| 11 |
RUN file /libc-a* | tee /libc-types.txt && touch -d @0 /libc-types.txt |
| 12 |
|
| 13 |
# expect them to have different target architectures listed in their ELF headers |
| 14 |
FROM registry.fedoraproject.org/fedora-minimal |
| 15 |
COPY --from=native /libc-types.txt / |