docker run -p 3000:3000 pixelfactory/playwright
$ docker run -p 3000:3000 pixelfactory/playwright
{"@timestamp":"2021-03-05T17:51:26.820Z","log.level":"info","message":"chromium server listening on ws://127.0.0.1:44227/8496b4a530c6d5ead24fe7f112fa609d","ecs":{"version":"1.6.0"}}
{"@timestamp":"2021-03-05T17:51:26.832Z","log.level":"info","message":"websocket proxy listening on ws://0.0.0.0:3000","ecs":{"version":"1.6.0"}}
Connect to the websocket :
const { chromium } = require('playwright');
const browser = await chromium.connect({
wsEndpoint: 'ws://localhost:3000',
});
const context = await browser.context();
const page = await context.page();
page.goto('https://example.com');
By default we start a chromium server, but you can choose the browser by passing the environment varialbe BROWSER_TYPE.
docker run -p 3000:3000 -e BROWSER_TYPE=chromium pixelfactory/playwright
docker run -p 3000:3000 -e BROWSER_TYPE=firefox pixelfactory/playwright
docker run -p 3000:3000 -e BROWSER_TYPE=webkit pixelfactory/playwright
By default the websocket proxy server listen on port 3000, but you can customize the port using the environment variable PORT.
docker run -p 5000:5000 -e PORT=5000 pixelfactory/playwright
Content type
Image
Digest
sha256:a1d9834df…
Size
839.8 MB
Last updated
almost 2 years ago
docker pull pixelfactory/playwright