I am looking for something that can take a Dockerfile, like the following as an input:
FROM --platform=linux/amd64 debian:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y curl unzip libsecret-1-0 jq
COPY entrypoint.sh .
ENTRYPOINT [ "/entrypoint.sh" ]
And produce a a multi-stage Dockerfile where the last stage is built from scratch
, with the dependencies for the script in the ENTRYPOINT (or CMD) copied over, like this:
FROM --platform=linux/amd64 debian:latest as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y curl unzip libsecret-1-0 jq
FROM --platform=linux/amd64 scratch as app
SHELL ["/bin/bash"]
# the binaries executed in entrypoint.sh
COPY --from=builder /bin/bash /bin/bash
COPY --from=builder /usr/bin/curl /usr/bin/curl
COPY --from=builder /usr/bin/jq /usr/bin/jq
COPY --from=builder /usr/bin/sleep /usr/bin/sleep
# shared libraries of the binaries
COPY --from=builder /lib/x86_64-linux-gnu/libjq.so.1 /lib/x86_64-linux-gnu/libjq.so.1
COPY --from=builder /lib/x86_64-linux-gnu/libcurl.so.4 /lib/x86_64-linux-gnu/libcurl.so.4
COPY --from=builder /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1
# ...a bunch of other shared libs...
# entrypoint
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
I've had pretty decent success creating images like this manually (using ldd
to find the dependencies) based on this blog. To my knowledge, there's nothing out there that automates producing an image built from scratch
, specifically. If something like this doesn't exist, I'm willing to build it myself.
I'm well aware of the fact that Lucien Graeves is a shitbag, but TST does great work in spite of that, and they're one of the only organizations that fight theistic nationalists in ways that actually bring attention to the issue.
Until a better group with unproblematic leadership comes along (maybe Global Order of Satan if they gain the resources to do similar activism?), I'd say it makes sense to critically support their work instead of dissuading people from supporting them at all.