Sign inSign up

sstc/headful-chromium

By sstc

•Updated about 1 month ago

https://github.com/docker-sstc/mono/tree/master/packages/headful-chromium

Image
0

3.8K

sstc/headful-chromium repository overview

⁠headful-chromium

Build workflow Docker pulls

⁠Usage

To use the globally installed Playwright inside your project, link it using:

docker run --rm \
  -v $(pwd):/app \
  -w /app \
  sstc/headful-chromium \
  npm link playwright
⁠2. Running Automation Tasks

You can run everything in a single container, or split responsibilities

⁠Option A: Launch Browser & Run Tasks (Standalone mode)

This will start a browser and immediately run your automation script in the same container:

docker run --rm \
  --init \
  --ipc=host \
  --privileged \
  -v $(pwd):/app \
  -w /app \
  sstc/headful-chromium \
  ./example-entrypoint.sh node example-standalone.mjs
⁠Option B: Start Browser Server and Connect Remotely (Server-client mode)

Step 1: Start the browser server in a dedicated container:

docker run --rm \
  --init \
  --ipc=host \
  --name server \
  -p 3000:3000 \
  -v $(pwd):/app \
  -w /app \
  sstc/headful-chromium \
  ./example-entrypoint.sh node example-server.mjs
# If the client is running on a different host than the server, you may need to forward the debugging port using:
# socat TCP-LISTEN:9222,fork,reuseaddr TCP:127.0.0.1:9222

Step 2: In another terminal/process/container, connect to the running browser server and execute your automation:

docker run --rm \
  --net host \
  -v $(pwd):/app \
  -w /app \
  sstc/headful-chromium \
  node example-client.mjs

⁠Refs

Tag summary

Content type

Image

Digest

sha256:0bfd5b1b0…

Size

919.9 MB

Last updated

about 1 month ago

docker pull sstc/headful-chromium