To bulk screenshot web pages in Docker, run a Playwright script in a container, read URLs from a list, and call page.screenshot() for each page. Use the official Playwright Docker image with the same pinned version as your project, install the Playwright package separately, and set fullPage: true if each screenshot should include the whole scrollable page.
What you need before capturing URLs
- Docker installed and running.
- A URL list containing pages you are permitted to access.
- A Playwright project whose package version matches the Playwright Docker image tag. The image includes browser executables and system dependencies, but not the Playwright package itself.
Use a specific image tag rather than a floating tag so the browser environment is reproducible. The official Docker documentation surfaced version v1.63.0 in its next documentation at the time reviewed; because that is next-version documentation, treat it as a time-sensitive example, not a recommendation to use that version. Check the current official instructions and select a tag matching your project’s installed Playwright version: Playwright Docker documentation.
Create a small bulk-capture project
This example uses Node.js and processes URLs sequentially. It writes viewport screenshots as PNG files into an output directory and records navigation or capture errors in a separate text file. Sequential processing is a simple starting point, not a prescribed performance limit; tune concurrency only after measuring your workload.
1. Add the URL list and script
Create urls.txt, with one URL per line:
https://example.com
https://www.iana.org/
Create package.json and install the Playwright package at the exact version corresponding to the image tag you choose:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute#1 Best Overall
- Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
{
"private": true,
"type": "module",
"scripts": { "capture": "node capture.mjs" },
"dependencies": { "playwright": "1.63.0" }
}
The version above is illustrative and should be replaced with the version you actually pin for both the package and image. Run npm install to generate the lockfile.
Save the following as capture.mjs:
import { chromium } from 'playwright';
import { mkdir, readFile, writeFile } from 'node:fs/promises';
const urls = (await readFile('urls.txt', 'utf8'))
.split(/r?n/)
.map(line => line.trim())
.filter(line => line.length > 0);
await mkdir('screenshots', { recursive: true });
const browser = await chromium.launch();
const errors = [];
try {
const context = await browser.newContext();
const page = await context.newPage();
for (let i = 0; i < urls.length; i++) {
const url = urls[i];
const filename = `screenshots/${String(i + 1).padStart(4, '0')}.png`;
try {
await page.goto(url, { waitUntil: 'load', timeout: 30000 });
await page.screenshot({ path: filename });
console.log(`Saved ${filename} from ${url}`);
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
errors.push(`${url}t${message}`);
console.error(`Failed ${url}: ${message}`);
}
}
await context.close();
} finally {
await browser.close();
}
if (errors.length > 0) {
await writeFile('screenshots/errors.txt', `${errors.join('n')}n`);
process.exitCode = 1;
}
The zero-padded index gives each input a deterministic filename without putting untrusted URL characters into a path. The input order is preserved, so keep the URL list alongside the output if you need a durable mapping from index to address.
2. Build and run with a version-matched image
Create a Dockerfile using the same version for the image and npm dependency. Verify the image tag and variant against the current official Docker documentation before building.
Rank #2
- Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
FROM mcr.microsoft.com/playwright:v1.63.0-noble
WORKDIR /work
COPY package.json package-lock.json ./
RUN npm ci
COPY capture.mjs urls.txt ./
CMD ["npm", "run", "capture"]
Build and run, mounting the screenshot directory so files remain on the host:
Recommended Free Tools
docker build -t bulk-playwright-capture .
mkdir -p screenshots
docker run --rm -v "$PWD/screenshots:/work/screenshots" bulk-playwright-capture
If your package version or image tag differs, change both together. Playwright warns that a version mismatch can prevent it from locating browser executables. For repeatable results, keep the image, package lockfile, and capture settings under version control.
Choose viewport or full-page screenshots
| Capture mode | How to set it | What it produces | Trade-off |
|---|---|---|---|
| Viewport | await page.screenshot({ path: filename }) |
The visible browser viewport. | Useful for a screen-level snapshot; content below the fold is omitted. |
| Full page | await page.screenshot({ path: filename, fullPage: true }) |
A tall image covering the scrollable document. | Captures more content and can produce larger dimensions and files. |
Playwright’s screenshot API supports a path and format-specific options; choose the format based on the downstream system that will consume the image. See Playwright screenshots and the Page API.
Rank #3
- CanaKit Raspberry Pi 5 Essentials Starter Kit
To make the bulk script capture the full document, change the screenshot call to:
await page.screenshot({ path: filename, fullPage: true });
Handle dynamic pages and larger lists carefully
Wait for the right page state
The example waits for the page’s load event. Pages that render key content later may need a more specific wait, such as waiting for a selector that identifies the content you need before taking the screenshot. A fixed delay can be useful for a known animation or delayed widget, but it can also waste time or remain too short when response times vary. Choose a wait condition that reflects the page and capture goal.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Decide on concurrency from measurements
The sequential loop is easier to debug and avoids opening many pages at once. For faster processing, use a bounded number of pages or workers and measure memory, browser stability, completion time, and destination-site behavior in your own environment. The Playwright documentation cited here does not prescribe a universal concurrency or retry value. Follow each site’s access rules rather than treating a large URL list as permission to make rapid requests.
Rank #4
- All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
- Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
- Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
- Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
- Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online
Keep screenshot comparisons reproducible
Rendering can vary with operating system, browser version, settings, hardware, power source, and headless mode. For visual baselines, capture and compare in the same environment, keeping the container image and capture configuration fixed. See Playwright visual comparisons.
Troubleshoot common failures
- Browser executable cannot be found: The Playwright package and Docker image may be on different versions. Pin and align them, rebuild the image, and rerun the container.
- A URL fails but the rest should continue: The sample catches errors per URL, prints the failed address, writes it to
screenshots/errors.txt, and exits with a nonzero status after the batch. Inspect the recorded message and retry only if appropriate. - The image is blank or missing late content: The page may not have rendered the needed content by the selected navigation event. Wait for a relevant selector or page-specific state before capturing.
- Images are unexpectedly short: The default screenshot captures the viewport. Add
fullPage: truewhen you need the scrollable document. - Output disappears after the container exits: Ensure the host directory is mounted at
/work/screenshotsand that the Docker command is run from the project directory. - Unexpected visual differences: Check that captures use the same image version, browser settings, viewport, and environment as the reference.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP, or PDF; the API supports bulk capture of up to 100 URLs per call. For a simple one-URL example, use cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for authentication and options. Before a capture, it can accept cookie or consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Best Value
- 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
- 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
- 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
- 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
- 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
Frequently Asked Questions
Does the Playwright Docker image include the Playwright npm package?
No. It provides browser executables and system dependencies; install the Playwright package in your project separately.
Can I use full-page screenshots in a Docker batch?
Yes. Set fullPage: true in the page.screenshot() options for each capture.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →

