Files
attack-defense-platform/services/phew/Dockerfile
T
root 24dbf0a662 draggable topology + attack visualizer + tools in containers
- topology nodes draggable (pointer events, SVG transform), layout hint shown
- attack visualizer: /api/attacks logs attacker->target events; red pulsing
  dashed arcs on recent attacks (60s hot), ⚔ counts ok/fail
- submit_flag now takes attacker_idx vs target_idx (A/D semantics); UI has
  target dropdown (enemy teams), leaderboard records target
- containers get vim+curl+wget+netcat+git+pip3 (Dockerfiles blogpost/cdn/
  phew/sheesh/warmup); warmup base ubuntu:20.04 EOL -> 24.04
- team portal: target dropdown refreshed after login (was empty pre-auth)
2026-09-23 18:05:44 +08:00

43 lines
1.0 KiB
Docker

FROM python:3.12-slim
ARG PASSWORD=root
ENV DEBIAN_FRONTEND=noninteractive
ENV HOME=/home/ctfuser
WORKDIR /home/ctfuser/chall
RUN apt-get update && apt-get install -y --no-install-recommends \
openssh-server \
build-essential \
libffi-dev \
libssl-dev \
python3-dev \
socat \
vim \
curl \
wget \
netcat-openbsd \
git \
bash \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -d /home/ctfuser -s /bin/bash ctfuser && \
echo "ctfuser:${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/ctfuser/chall/src
COPY ./start.sh /start.sh
RUN chmod +x /start.sh /home/ctfuser/chall/src/run.sh
RUN chown -R root:root /home/ctfuser/chall && \
chmod -R 555 /home/ctfuser/chall && \
chown ctfuser:ctfuser /home/ctfuser/chall/src/Pailier.py && \
chmod 755 /home/ctfuser/chall/src/Pailier.py
EXPOSE 8000 22
CMD ["/start.sh"]