node-server-screenshot icon indicating copy to clipboard operation
node-server-screenshot copied to clipboard

Problem on Docker

Open guilherme-fortes opened this issue 3 years ago • 1 comments

Hi! I've been trying to dockerize an app with your component. The code runs perfectly on local machine, but when i try to implement this on docker nothing happens. I've installed all dependencies of the component in a container and I'm also using the option show:false, but I'm still getting no results. Have u or anyone else here had successes on run this on Docker?

guilherme-fortes avatar Aug 06 '21 20:08 guilherme-fortes

It does run on github actions here (which afaik are docker containers) like so:

xvfb-run --server-args="-screen 0, 1240x627x24" node example.js

Where example.js is something like:

var sshot = require("node-server-screenshot");
sshot.fromURL(url, destinationFile, {show:false, width:1240, height:627, clip:{x:20, y:0, width:1200, height:627}}, function(err) {
  /* ... */
}

exalted avatar Sep 14 '21 10:09 exalted