I would like to start the service during the build of Docker. I do not need this service to continue working after the build process is complete (or I know that I can use the CMD command for this), but I need it to work long enough to execute the second command, which relies on this service and works.
To be more precise, I am trying to write a Docker file for the ejabberd XMPP server, which also installs a module for this server. I am trying to start an ejabberd server with running ejabberdctl, and then install the module using the ejabberdctl module_install utility, which depends on starting and starting node. It looks like this:
RUN ejabberdctl start && ejabberdctl modules_update_specs && ejabberdctl module_install ejabberd_auth_http
Now I had a problem, and I came up with two possible reasons. The problem is that my assembly does not work from this line, because node does not work when the second command tries to execute. I get the following error, which is typical when you try to use the ejabberdctl utility, without node actually up:
RPC connection failed with node ejabberd @localhost
The command '/ bin / sh -c ejabberdctl start && & & & ejabberdctl modules_update_specs && & & ejabberdctl module_install ejabberd_auth_http' returned a non-zero code: 3
, , , node, . , . , , init.d, Docker .
, , , .
, , ejabberd , . , ejabberdctl.