Dockerfile (1230B)
1FROM ubuntu@sha256:7a57c69fe1e9d5b97c5fe649849e79f2cfc3bf11d10bbd5218b4eb61716aebe6 as builder 2 3ADD --chmod=0755 --checksum=sha256:4c97fd03a3b181996b1473f3a99b69a1efc6ecaf2b4ede061b6bd60a96b9325a \ 4 https://raw.githubusercontent.com/reproducible-containers/repro-sources-list.sh/v0.1.0/repro-sources-list.sh \ 5 /usr/local/bin/repro-sources-list.sh 6 7RUN \ 8 --mount=type=cache,target=/var/cache/apt,sharing=locked \ 9 --mount=type=cache,target=/var/lib/apt,sharing=locked \ 10 /usr/local/bin/repro-sources-list.sh && \ 11 apt-get update && apt-get install -y \ 12 musl-dev \ 13 musl-tools \ 14 make \ 15 xz-utils 16 17WORKDIR /work 18 19ADD --chmod=0666 --checksum=sha256:4300f2fbc3996bc389d3c03a74662bfff3106ac1930942c5bd27580c7ba5053d \ 20 https://yx7.cc/code/ynetd/ynetd-0.1.2.tar.xz \ 21 /work/ynetd-0.1.2.tar.xz 22 23RUN tar -xJf ynetd-0.1.2.tar.xz && cd ynetd-0.1.2 && CC="musl-gcc" CFLAGS="-static" make 24 25 26FROM ubuntu@sha256:7a57c69fe1e9d5b97c5fe649849e79f2cfc3bf11d10bbd5218b4eb61716aebe6 as runner 27 28RUN echo "8f7d59c6f95b0cf57a8db165033296dda91d1239 /lib/x86_64-linux-gnu/libc.so.6" | sha1sum -c 29 30COPY --from=builder /work/ynetd-0.1.2/ynetd /ynetd 31 32COPY ./main /main 33COPY ./flag /flag 34 35CMD /ynetd -p 1024 /main