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"]