Add files via upload

This commit is contained in:
itoid
2025-10-21 20:57:57 +07:00
committed by GitHub
parent 7318509752
commit 6d9816d191
11 changed files with 231 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
FROM python:3.12-slim
ARG PASSWORD=root
ENV DEBIAN_FRONTEND=noninteractive
ENV HOME=/home/ctf
WORKDIR /home/ctf/chall
RUN apt-get update && apt-get install -y --no-install-recommends \
openssh-server \
build-essential \
libffi-dev \
libssl-dev \
python3-dev \
bash \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -d /home/ctf -s /bin/bash ctf && \
echo "ctf:${PASSWORD}" | chpasswd
RUN mkdir -p /var/run/sshd
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
COPY ./src /home/ctf/chall/src
COPY ./start.sh /start.sh
RUN chmod +x /start.sh /home/ctf/chall/src/run.sh
RUN chown -R root:root /home/ctf/chall && chmod -R 555 /home/ctf/chall
EXPOSE 8000 22
CMD ["/start.sh"]