ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 44 forks source link

docker_xud_1 exited with code 1 #673

Closed programarivm closed 6 years ago

programarivm commented 6 years ago

I tried to get the docker containers running as shown next.

docker-compose up -d:

...
xud_1  | 
xud_1  | > xud@1.0.0-alpha.3 start /opt/xud
xud_1  | > node dist/Xud.js
xud_1  | 
xud_1  | module.js:549
xud_1  |     throw err;
xud_1  |     ^
xud_1  | 
xud_1  | Error: Cannot find module '/opt/xud/dist/Xud.js'
xud_1  |     at Function.Module._resolveFilename (module.js:547:15)
xud_1  |     at Function.Module._load (module.js:474:25)
xud_1  |     at Function.Module.runMain (module.js:693:10)
xud_1  |     at startup (bootstrap_node.js:191:16)
xud_1  |     at bootstrap_node.js:612:3
xud_1  | npm ERR! code ELIFECYCLE
xud_1  | npm ERR! errno 1
xud_1  | npm ERR! xud@1.0.0-alpha.3 start: `node dist/Xud.js`
xud_1  | npm ERR! Exit status 1
xud_1  | npm ERR! 
xud_1  | npm ERR! Failed at the xud@1.0.0-alpha.3 start script.
xud_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
xud_1  | 
xud_1  | npm ERR! A complete log of this run can be found in:
xud_1  | npm ERR!     /root/.npm/_logs/2018-11-14T21_58_32_545Z-debug.log
docker_xud_1 exited with code 1

docker ps -a:

CONTAINER ID        IMAGE                      COMMAND             CREATED             STATUS                     PORTS                                                              NAMES
204b4448d3a4        exchangeunion/xud:latest   "npm start"         15 minutes ago      Exited (1) 5 minutes ago                                                                      docker_xud_1
31e6eabb1db9        btcd                       "./start-btcd.sh"   15 minutes ago      Up 15 minutes              8333-8334/tcp, 18333-18334/tcp, 18555-18556/tcp, 28901-28902/tcp   btcd
4a8fd13bdc6e        lnd                        "./start-lnd.sh"    15 minutes ago      Exited (1) 5 minutes ago                                                                      docker_lnd_1
programarivm commented 6 years ago

I wonder if it'd make sense to install the npm packages through the containers, kind of like this:

git clone https://github.com/ExchangeUnion/xud
cd ~/xud/docker
docker-compose up -d

And then run:

docker exec -it --user 1000:1000 <xud-container-name-here> npm install
docker exec -it --user 1000:1000 <xud-container-name-here> npm run compile
programarivm commented 6 years ago

https://github.com/ExchangeUnion/xud-wiki/pull/2