Containerfile.x64 (1181B)
1 # test/libc/musl/Containerfile.x64 — produces a musl x86_64 sysroot 2 # tarball on stdout. Pinned to Alpine 3.20.10 + musl 1.2.5. 3 # 4 # Companion to ./Containerfile (aarch64). See that file for the design 5 # notes on what gets staged and why; only the arch-specific bits differ 6 # here: 7 # - amd64/alpine base image 8 # - ld-musl-x86_64.so.1 as the dynamic loader (still aliased to 9 # libc.so so kit ld can link against it as a shared input). 10 FROM docker.io/amd64/alpine:3.20.10 11 12 RUN apk add --no-cache musl-dev linux-headers 13 14 RUN mkdir -p /sysroot/lib /sysroot/include \ 15 && cp /usr/lib/crt1.o /sysroot/lib/ \ 16 && cp /usr/lib/Scrt1.o /sysroot/lib/ \ 17 && cp /usr/lib/rcrt1.o /sysroot/lib/ \ 18 && cp /usr/lib/crti.o /sysroot/lib/ \ 19 && cp /usr/lib/crtn.o /sysroot/lib/ \ 20 && cp /usr/lib/libc.a /sysroot/lib/ \ 21 && cp /usr/lib/libssp_nonshared.a /sysroot/lib/ \ 22 && cp /lib/ld-musl-x86_64.so.1 /sysroot/lib/ \ 23 && ln -s ld-musl-x86_64.so.1 /sysroot/lib/libc.so \ 24 && cp -r /usr/include/. /sysroot/include/ 25 26 RUN echo "alpine 3.20.10 musl 1.2.5-r3" > /sysroot/PROVENANCE \ 27 && uname -m >> /sysroot/PROVENANCE 28 29 ENTRYPOINT ["sh", "-c", "tar -C /sysroot -cf - ."]