mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: add Dockerfile (#8315)
This PR adds an official Dockerfile for Puppeteer. The content of the Dockerfile is practically the same as documented in troubleshooting.md: 1) It installs chrome-stable and dependencies via apt-get. 2) it installs a local Puppeteer build into the docker user's home folder. 3) configures required permissions for the user. 4) outputs licenses into the THIRD_PARTY_NOTICES file. The local Puppeteer build is created by `docker/pack.sh` which is meant to be used in CI. This PR also includes a GitHub action that would build a docker image and run a smote test inside of it. The next step would be actually publishing the docker image from GitHub Actions to GitHub Registry.
This commit is contained in:
9
docker/test/smoke-test.js
Normal file
9
docker/test/smoke-test.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
|
||||
(async () => {
|
||||
const browser = await puppeteer.launch();
|
||||
const page = await browser.newPage();
|
||||
await page.goto('https://example.com');
|
||||
await browser.close();
|
||||
console.log('done');
|
||||
})();
|
||||
Reference in New Issue
Block a user