Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM ubuntu:22.04
- ENV DEBIAN_FRONTEND=noninteractive \
- PYTHONDONTWRITEBYTECODE=1 \
- PYTHONUNBUFFERED=1 \
- HEADLESS_MODE=true
- RUN apt-get update && apt-get install -y --no-install-recommends \
- bash git curl ca-certificates \
- python3 python3-pip python3-dev \
- build-essential linux-libc-dev \
- # deps mirrored from install_ragnar.sh packages=(...) :contentReference[oaicite:1]{index=1}
- wget lsof sudo \
- libopenjp2-7 \
- nmap \
- libopenblas-dev \
- bluez \
- bridge-utils \
- python3-pil \
- libjpeg-dev zlib1g-dev libpng-dev \
- libffi-dev libssl-dev \
- python3-sqlalchemy python3-pandas python3-numpy \
- python3-flask python3-flask-socketio python3-flask-cors \
- hostapd dnsmasq network-manager wireless-tools iproute2 iputils-ping rfkill \
- sqlite3 arp-scan tcpdump nikto sqlmap whatweb \
- && rm -rf /var/lib/apt/lists/*
- WORKDIR /opt/ragnar
- RUN git clone https://github.com/PierreGode/Ragnar.git . \
- && git submodule update --init --recursive
- # Python deps (filter Pi-only hardware libs for headless containers)
- RUN grep -vE '^(RPi\.GPIO|spidev)\b' requirements.txt > /tmp/requirements.docker.txt \
- && pip3 install --upgrade pip \
- && pip3 install --no-cache-dir -r /tmp/requirements.docker.txt \
- && pip3 install --no-cache-dir requests flask colorama
- RUN useradd -m -u 10001 ragnar \
- && mkdir -p /data \
- && chown -R ragnar:ragnar /data /opt/ragnar
- USER ragnar
- EXPOSE 8000
- HEALTHCHECK --interval=30s --timeout=3s --start-period=20s --retries=3 \
- CMD curl -fsS http://localhost:8000/ || exit 1
- CMD ["python3", "headlessRagnar.py", "--host", "0.0.0.0"]
Advertisement