From f272f9338091733fe2f1f725d26d0c5646332111 Mon Sep 17 00:00:00 2001 From: Adityaaa <144815351+addydude@users.noreply.github.com> Date: Mon, 9 Nov 2026 08:39:45 +0530 Subject: [PATCH] build: add Docker image for scrape mode Slim python:3.12 image with WebVac installed from source and Patchright Chromium ready to launch. /data is the working directory so scan output can be volume-mounted. The optional De-Caffeinator VAPT task is left out on purpose (submodule + Node.js) to keep the image lean. Closes #4 --- .dockerignore | 16 ++++++++++++++++ Dockerfile | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3b2a1ee --- /dev/null +++ b/.dockerignore @@ -0,0 +1,16 @@ +.git +.github +.venv +__pycache__ +*.pyc +.pytest_cache +scraped_data +decaffeinator +docs +examples +tests +.env +capsolver.key +proxies.txt +auth_creds.json +sessions diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f538b2f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# WebVac — asyncio dynamic web scraper (scrape/crawl mode). +# +# Build: docker build -t webvac . +# Doctor: docker run --rm webvac --doctor +# Scrape: docker run --rm -v webvac-data:/data webvac --url https://example.com --mode single +# +# Scan output is written under /data/scraped_data (the working directory), +# so mount a volume at /data to keep it. The optional De-Caffeinator VAPT +# task is not included: it needs the decaffeinator submodule and Node.js, +# which are deliberately left out to keep this image lean. +FROM python:3.12-slim + +ENV PYTHONUNBUFFERED=1 \ + PIP_NO_CACHE_DIR=1 + +WORKDIR /app + +# Install the package first (README is referenced by pyproject metadata). +COPY pyproject.toml README.md ./ +COPY webvac ./webvac +COPY run.py ./ + +RUN pip install --upgrade pip \ + && pip install . \ + && python -m patchright install --with-deps chromium + +# Runtime working directory: scraped_data/ lands here. +RUN mkdir -p /data +WORKDIR /data + +ENTRYPOINT ["webvac"] +CMD ["--help"]