A docker image that uses nodejs puppeteer and mesa software rendering to render p5js sketches into pngs.
It provides both HTTP and CLI interface.
docker run -v$PWD:$PWD -w$PWD -it --rm riccardoblb/p5js-docker-renderer --help
Note: only the current directory ( $PWD ) will be accessible by the container.
Start the webservice
docker run -p8080:8080 --restart=always --name="p5jsrenderer" --tmpfs /tmp --read-only -d riccardoblb/p5js-docker-renderer
http://localhost:8080/! JAVASCRIPT CODE !.png
JAVASCRIPT CODE can be :
Plain js code
Js code encoded in base64
b64: (eg. b64:ENCODED JAVASCRIPT CODE)An url to a js file
url: (eg. url:http://example/sketch.js)An url to a js file encoded in base64
url: and the encoded result must be prefixed with b64: (eg. b64:base64(url:http://example/sketch.js))!.png can be replaced with !.json to get the logs.
Content type
Image
Digest
Size
597.6 MB
Last updated
over 6 years ago
docker pull riccardoblb/p5js-docker-renderer