-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drawio command-line export requires X-server connection #146
Comments
Possible work around might be to use Xvfb. I've not tried it in docker, but have used this in Vagrant:
|
Xfvb does work for me without any arguments aside from the command itself. It would be nice not to have to use it however. |
The following Dockerfiile allows export of drawio files in a headless docker environment:
|
Works fine: docker run --rm --volume="${PWD}/:/data" fnkr/drawio --export --format png --output /data/diagram.png /data/diagram.drawio Source: https://github.com/pkg-src/drawio.docker |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information. |
This is still an issue. |
I am seeing this issue trying to run command line generation of png files over ssh, and believe this is still relevant to this issue. Can someone explain a little more detail about what portion of the code is requiring the x-server connection? I was thinking it was related to off-screen versus on-screen rendering but this issue leads me to think its something slightly different. |
I don't see any route here apart from using xvfb. draw.io can't run purely on node, it needs a browser and full DOM. It's either that or we add the same kind of functionality to draw in the docker image. I will close since a working workaround has been provided using xvfb. The CLI feature in docker is jgraph/docker-drawio#18 |
This is a sub-task of #127.
I'm trying to create a pipeline that uses drawio export mode and package it up for easy use in a docker container. Since the export mode does not display anything it would be nice if we didn't have to use xvfb-run just to make it work. Here is what happens without xvfb-run wrapping the command:
There are some X utilities with a command line mode that complain like this but still complete the commandline batch/cmd. drawio appears to be exiting with an error in this situation. By creating a wrapper in the Dockerfile that runs within xvfb-run the command succeeds:
Note that the Home directory permissions issue is non-fatal and is issue #145
The text was updated successfully, but these errors were encountered: