FROM ubuntu:24.04

# Minimal base with a vulnerable Git version for CVE-2025-48384 demos.
# Note: Version pin may need adjustment depending on mirror availability.

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
       ca-certificates \
       tzdata \
       curl \
       gnupg \
    && rm -rf /var/lib/apt/lists/*

# Install a known vulnerable Git (example pin).
# Adjust to another < 2.43.7 if this exact pin is unavailable on your host.
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
       git=1:2.43.0-1ubuntu7 \
    && rm -rf /var/lib/apt/lists/*

# Create unprivileged user for safety.
RUN useradd -m -u 1000 ctfuser
USER ctfuser
WORKDIR /home/ctfuser

CMD ["/bin/bash"]

