Files
ctf/2026/cscg/crypto/zipper/Dockerfile
2026-04-10 03:31:12 +02:00

29 lines
833 B
Docker

FROM sagemath/sagemath:10.6@sha256:19995db6194f4a4bab18ce9a88556fd15b9ed5e916b4504fefe618a7796ddbdb
USER root
ADD --chmod=0755 --checksum=sha256:c125df9762b0c7233459087bb840c0e5dbfc4d9690ee227f1ed8994f4d51d2e0 \
https://raw.githubusercontent.com/reproducible-containers/repro-sources-list.sh/v0.1.4/repro-sources-list.sh \
/usr/local/bin/repro-sources-list.sh
RUN repro-sources-list.sh
RUN apt-get update && apt-get install -y xinetd
RUN sage -pip install --no-cache-dir --upgrade pip
RUN sage -pip install --no-cache-dir pycryptodome
RUN mkdir /ctf
WORKDIR /ctf
RUN echo "Connection blocked." > /etc/banner_fail
COPY ctf.xinetd /etc/xinetd.d/ctf
COPY run.sh .
COPY challenge.py .
RUN chown -R root:sage /ctf && chmod -R 750 /ctf && chmod 777 /ctf/run.sh && chmod 770 /ctf
CMD [ "xinetd", "-dontfork" ]
EXPOSE 1337