Camunda-modeler: Cannot build/run the modeler as docker

Created on 27 Nov 2020  路  7Comments  路  Source: camunda/camunda-modeler

__Describe the Bug__

I cannot start the camuda-modeler. I get the following error:

[email protected] app:dev /home/modeler
electron ./app/dev.js --force-update-checks resources/diagram/simple.bpmn
[134:1127/072806.341331:FATAL:atom_main_delegate.cc(211)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
[email protected] dev /home/modeler/client
run-s start
[email protected] start /home/modeler/client
cross-env NODE_ENV=development webpack-dev-server --config ./webpack.config.js --port 3000
sh: 1: cross-env: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn

__Steps to Reproduce__

In order to reproduce, download the release 4.4.0 as a zip and unpack it then run the attached docker file Dockerfile.txt from inside the folder

Then run the container with: docker run --network=host -it imagename . Switch to posix enabled terminal bash --posix and go in the /modeler folder. Run npm install and then npm start, you will see the error

__Expected Behavior__
The system should start

__Environment__

bug

All 7 comments

So, I was able at least to start the program by going inside the /client folder and perform an npm install there. Now, from the /modeler folder if I run npm start it works. However, I see just a blank page (localhost:3000). The blank page is the one of webpack, this is fine. What is not opening is the Camuda modeler.

Could you verify the following:

  • You are attempting to run the Camunda Modeler development setup from within Docker
  • :arrow_forward: That does not work.

The issue is likely that you run the whole thing as root within the docker container, which apparently is not supported:

[134:1127/072806.341331:FATAL:atom_main_delegate.cc(211)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

As a general best practice working with docker containers, setup a non root user and try to continue from there.

For me it is a requirement to get it running in a docker container. I was already able to dockerize the bpmnjs so this should be just a step-further. Your suggestion would be for a non-root user?

The error message is fairly clear about that. I'd suggest you to try it out and report back, yes.

So, I was able to get it running after some time. The sample docker is the following: DockerfileTest.txt.

In order to run it you must do: docker run --rm --network=host --privileged -e DISPLAY=$DISPLAY -it YOURIMAGE. This solves the issue of the --no-sandbox option required.

However, once inside I encounter the issue that I need to run npm start twice. The first one seems is "warming up" everything (I need to wait for output of webpack). The second one, then shows camuda working.

Any help? Why I need to run npm start twice? This is not useful if I need to create my final docker app.

Happy that you got the basics running and shared your solution. It is great how far you got.

To clarify though we cannot support you in running the development setup of the App inside docker. We do in no way recommend that setup, too. There is many things wrong about it, including (but not limited to) potential poor performance and pain to set it up (you experienced it).

I'll close this issue as you were able to get things running.

However, once inside I encounter the issue that I need to run npm start twice. The first one seems is "warming up" everything (I need to wait for output of webpack). The second one, then shows camuda working.

This is expected behavior, with or without docker. You'll initially see an empty page and have to CMD/CTRL + R in order to refresh the app once the initial webpack bundle completed.

Was this page helpful?
0 / 5 - 0 ratings