# NeuroSploit — main application image # # The console, the harness and the toolbox share one Kali container. Running the # web tier on the same image as the tools means an agent calls nmap or sqlmap # directly instead of spawning a sibling container for every command, which is # where most of the per-tool latency used to go. `--sandbox` still spawns an # isolated container when an engagement wants tools kept off this host. # # Build order matters: this image derives from the toolbox image, so build that # first. `./install.sh` does both in order. # # docker build -t neurosploit-kali:local -f Dockerfile.kali . # docker build -t neurosploit:local -f Dockerfile . # ── Rust build ────────────────────────────────────────────────────────── FROM rust:1.83-bookworm AS rust-build WORKDIR /src COPY neurosploit-rs/ ./ RUN cargo build --release --bin neurosploit \ && strip target/release/neurosploit \ && cp target/release/neurosploit /out-neurosploit # ── Runtime: the Kali toolbox image, plus the console ─────────────────── FROM neurosploit-kali:local USER root RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ nodejs npm; \ apt-get clean; \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* WORKDIR /app COPY --from=rust-build /out-neurosploit /usr/local/bin/neurosploit COPY web/ /app/web/ COPY agents_md/ /app/agents_md/ COPY db/ /app/db/ RUN set -eux; \ cd /app/web; \ if [ -f package-lock.json ]; then npm ci --omit=dev; else npm install --omit=dev; fi; \ npm cache clean --force; \ mkdir -p /app/runs; \ chown -R 10001:10001 /app USER 10001:10001 ENV NODE_ENV=production EXPOSE 8787 HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ CMD node -e "require('http').get('http://127.0.0.1:8787/api/auth/status',r=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))" CMD ["node", "/app/web/server.js"]