You can build the application using:
docker build -t chrome-headless-docker .
Start the server on port 8081
using docker
docker run --shm-size=2gb -p 8081:8081 chrome-headless-docker:latest
await puppeteer.connect({ browserWSEndpoint: 'ws://localhost:8081' })