Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To open a Playwright HTML report from Docker, start Playwright’s report server inside the container on 0.0.0.0, publish the same port to the host, and open that host port in a browser. For example, serve playwright-report on port 9323 and run the container with -p 9323:9323. Don’t open index.html directly: the report needs to be served, and its attachments must stay with the report directory.

Why opening index.html directly can fail

Playwright’s HTML report is a directory of files, not just a standalone index.html. The report page refers to data and attachments that can include screenshots, videos, traces, and other test output. Opening the file from the filesystem does not provide the web server the report expects, so the page may appear blank or incomplete and attachments may not work.

Use Playwright’s show-report command to serve the report over HTTP. Keep the complete report directory together; copying only index.html is not enough.

Open the report from a running Docker container

  1. Generate the report. Run your tests with the HTML reporter: npx playwright test --reporter=html. Playwright writes the report to playwright-report/ by default.
  2. Start the report server inside the container. Run npx playwright show-report playwright-report --host 0.0.0.0 --port 9323. Binding to 0.0.0.0 allows the server to accept connections through the container’s network interface.
  3. Publish the port when starting the container. Use docker run --rm -p 9323:9323 <your-playwright-image>. The left-hand number is the host port and the right-hand number is the container port.
  4. Open the host address. Visit http://localhost:9323 in a browser on the Docker host. If you mapped a different host port, use that port in the address.

The port mapping and the port passed to show-report must line up. Playwright’s documented default report port is 9323; specifying it explicitly makes the container configuration clear and keeps the command consistent with the mapping.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Build and run a minimal report container

This example runs tests, then keeps the container running with the report server. Replace the image tag with a pinned Playwright version aligned with the version your project uses.

FROM mcr.microsoft.com/playwright:<pinned-version>-jammy
WORKDIR /work
COPY package*.json ./
RUN npm ci
COPY . .
CMD ["sh", "-c", "npx playwright test --reporter=html && npx playwright show-report playwright-report --host 0.0.0.0 --port 9323"]

Build and start it from the directory containing the Dockerfile:

docker build -t pw-report .
docker run --rm -p 9323:9323 pw-report

When the tests finish, the shell command proceeds to show-report. Keep that process running while you view the report. Stopping or removing the container ends access through this local port. If your test command exits unsuccessfully, the shell’s && means the report server will not start; use the troubleshooting guidance below to make the report available after a failed test run.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Keep the image and project versions aligned

Pin the Playwright Docker image to a version matching the Playwright version installed by the project. The image tag should not be left as a floating version in a reproducible setup. Version alignment matters especially when the container runs the browser tests, rather than merely serving a previously generated report.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Runtime options for Chromium tests

For containerized Chromium test execution, Playwright recommends starting Docker with --init and --ipc=host. For example:

docker run --rm --init --ipc=host -p 9323:9323 pw-report

These flags relate to the test-running container. The report’s reachability still depends on the server binding to 0.0.0.0 and publishing the report port.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Configure the report output directory

The HTML reporter normally writes to playwright-report/. You can change the output directory in reporter configuration or with the PLAYWRIGHT_HTML_OUTPUT_DIR environment variable. If you choose a different directory, pass that directory to show-report instead of the default. For example, if the report is generated in artifacts/html, serve it with:

npx playwright show-report artifacts/html --host 0.0.0.0 --port 9323

Playwright’s show-report accepts a report directory or a zip file. In either case, make sure the path you provide is available inside the container at the time the server starts.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose how to deliver reports beyond a local container

Delivery method Best fit Trade-off
Local Docker port One developer inspecting a report on the machine running Docker. Access lasts only while the container and report server are running.
CI artifact Retaining a report with a build so teammates can inspect it in the CI system. Readers may need to download and extract the artifact before viewing it.
Static hosting Sharing a stable URL without asking each reader to run a container. Requires hosting configuration and deliberate access controls.

CI artifacts

In a CI job, run tests in a compatible Linux environment or Playwright container, then upload the entire playwright-report/ directory as an artifact. Keeping the full directory preserves the report data and attachments. Playwright’s CI guidance includes containerized jobs and report artifact upload patterns.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Static hosting

For a stable external URL, publish the report through static website hosting rather than making every reviewer download a zip. Playwright’s CI introduction describes static website hosting, including Azure Storage static websites. Hosting setup and availability depend on the chosen provider, and the report may contain sensitive test output; restrict access accordingly.

Troubleshoot a blank page, refused connection, or missing attachment

  • The browser cannot connect. Confirm that show-report is running, that it was started with --host 0.0.0.0, and that Docker publishes the port. A server bound only to localhost inside the container may not be reachable through the published port.
  • The container port and published port differ. If the server listens on 9323, map the container’s port 9323. To use host port 8080 instead, for example, use -p 8080:9323 and open http://localhost:8080; the server still listens on container port 9323.
  • Port 9323 is already in use on the host. Change only the host side of the mapping, such as -p 8080:9323, and visit the corresponding host address. Alternatively, choose another free port for both show-report --port and the container side of the mapping.
  • The page loads but report data or attachments are missing. Serve the complete generated directory or its zip, not a copied index.html. Verify that the report path passed to show-report is the actual output location.
  • No report server starts after tests fail. In the sample command, && runs show-report only if the test command succeeds. Separate report serving from test execution, or use a shell pattern that starts the report server after the test command regardless of its exit status. Ensure the report was generated before attempting to serve it.
  • The container cannot install or run the project correctly. Check that the image’s Playwright version matches the project dependency and that dependencies were installed successfully. For Chromium tests, include the recommended --init and --ipc=host runtime options.
  • CI reviewers cannot see the report. Confirm that the full report directory was retained as an artifact and that its visibility settings allow the intended reviewers. A local container port is not a durable sharing URL.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Security and reliability considerations

Reports may expose screenshots, traces, URLs, and test data. Treat them as build artifacts that can contain sensitive information: review what tests captured, limit artifact or hosting access to the intended audience, and apply the retention rules appropriate to the project. A port published on the Docker host is useful for local review, but do not mistake that convenience for controlled long-term hosting.

For repeatable builds, pin the Playwright container image and keep it aligned with the project’s Playwright dependency. Generate the report and preserve it as a complete directory or zip so that later inspection does not depend on files left behind in a temporary container.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Or skip the browser setup

ScreenshotNeo is a separate website screenshot API; it does not serve or open a Playwright test report. If your adjacent task is capturing a website page as an image or PDF, its one-request API can return a screenshot. See the ScreenshotNeo website and API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie banners and removes known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server provides screenshot tools for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for the free plan.

Frequently asked questions

Can I open a zipped Playwright report?

Yes. The show-report command accepts either a report directory or a zip file. Keep the archive intact and provide its accessible path in the container.

Does the report server need to run in the same container as the tests?

No. It needs access to the generated report directory or zip, so you can serve an artifact from a separate container if you make that report available there.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can teammates access my localhost report URL?

localhost refers to the machine where the browser is running. For team access, use your CI artifact workflow or publish the report on a suitably access-controlled static host.

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.