Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: hide docker integration behind the curtain (#17715)

Andrey Lushnikovd897407833c1
diff --git a/docs/src/docker.md b/docs/src/docker.md
index f039b321f5..dc7b5a24e0 100644
--- a/docs/src/docker.md
+++ b/docs/src/docker.md
@@ -146,59 +146,3 @@ The image will be tagged as `playwright:localbuild-focal` and could be run as:
docker run --rm -it playwright:localbuild /bin/bash
```
-## (Experimental) Playwright Test Docker Integration
-* langs: js
-
-Playwright Test now ships an **experimental** Docker integration. The Docker container provides a consistent environment, eliminating browser rendering differences across platforms.
-With this integration, **only** browser binaries are running inside a Docker container,
-while all the code is still running on the host operating system.
-
-Playwright Test will automatically proxy host network traffic
-into the container, so browsers can access servers running on the host.
-
-:::note
-Docker integration requires Docker installed & running on your computer.
-See https://docs.docker.com/get-docker/
-
-If you use [Docker Desktop](https://www.docker.com/products/docker-desktop/), make sure to increase
-default CPU and memory limit for better performance.
-:::
-
-Docker integration usage:
-
-1. Build a local Docker image that will be used to run containers. This step
- needs to be done only once.
-
- ```bash js
- npx playwright docker build
- ```
-
-1. Run Docker container in the background.
-
- ```bash js
- npx playwright docker start
- ```
-
-1. Run tests inside Docker container using the `PLAYWRIGHT_DOCKER` environment variable.
- You can set this environment variable as a part of your config:
-
- ```ts
- // playwright.config.ts
- import type { PlaywrightTestConfig } from '@playwright/test';
-
- process.env.PLAYWRIGHT_DOCKER = '1';
-
- const config: PlaywrightTestConfig = {
- /* ... configuration ... */
- };
- export default config;
- ```
-
- NOTE: Playwright will automatically detect a running Docker container or start it if needed.
-
-1. Finally, stop background Docker container when you're done working with tests:
-
- ```bash js
- npx playwright docker stop
- ```
-
diff --git a/packages/playwright-core/src/containers/docker.ts b/packages/playwright-core/src/containers/docker.ts
index 17e393040e..a5a888d5e0 100644
--- a/packages/playwright-core/src/containers/docker.ts
+++ b/packages/playwright-core/src/containers/docker.ts
@@ -276,7 +276,7 @@ function createStacklessError(message: string) {
}
export function addDockerCLI(program: Command) {
- const dockerCommand = program.command('docker')
+ const dockerCommand = program.command('docker', { hidden: true })
.description(`Manage Docker integration (EXPERIMENTAL)`);
dockerCommand.command('build')