A container that expose a HTTP endpoint to take screenshot of a webpage. It use a puppeteer with the maximum Web GL capabilities that is possible inside a container.
In fact this container does not take the screenshot for you... It listen for a custom DOM event called screenshotTaken that contain the actual screenshot.
The opened web page have:
CustomEvent that contain the data URIscreenshotTaken custom eventconst screenshotDataURI = 'data:image/png;base64,...'
document.dispatchEvent(
new CustomEvent('screenshotTaken', {
detail: {
dataURI: screenshotDataURI,
},
}),
)
GET /screenshotParameter:
target (string): the web page to openLoad the web page given in the target parameter and return the screenshot contained in the screenshotTaken event of the target page (see the How to make a screenshot section for a detailed explanation). To respect the URL format the target parameter should be URL encoded.
Eg:
GET /screenshot?target=https%3A%2F%2Fplayground.babylonjs.com%2F%23FZTP31%231
The target page have 60 seconds to return the screenshotTaken event. The endpoint will return an error 500 after 60 seconds.
GET /capabilities/webgl.htmlOnly available in debug mode
Expose the https://alteredqualia.com/tools/webgl-features/ webgl features detection page from inside the container.
GET /healthCheck the container status. Return a 200 HTTP status if everythings is ok.
DEBUG (boolean): Increase the log outputed by the container (false by default)SENTRY_DSN (string): The sentry.io error reporting DSN (optional)Content type
Image
Digest
Size
188.4 MB
Last updated
almost 7 years ago
docker pull magelan/docker-screenshot