Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Erro ao rodar o docker run node

Ola estou rodando o comando pelo terminal do linux fedora...o arquivo esta exatamente no Desktop e com esse nome...porem aparece o erro abaixo e não roda..alguem me ajuda?

bash-5.0$ docker run -v "/home/wilsonqueiroz/Desktop/volumeExemplo:/var/www" -w "var/www" node npm start /usr/bin/docker-current: Error response from daemon: the working directory 'var/www' is invalid, it needs to be an absolute path. See '/usr/bin/docker-current run --help'.

See '/usr/bin/docker-current run --help'.

3 respostas
solução!

Oi, Wqueiroz.

Fechando essa dúvida pois ela está repetida e te respondi na outra: https://cursos.alura.com.br/forum/topico-erro-ao-rodar-o-docker-run-node-87335

Acredito que o comando abaixo deve ser alterado: de:

-w "var/www"

para:

-w "/var/www"

consegui resolver porem me gerou outro problema:

[root@localhost ~]# docker run -p 8080:3000 -v "/home/wqueiroz/Documents/volume:/var/www" -w "/var/www" node npm start Error: EACCES: permission denied, scandir '/var/www' (node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'loaded' of undefined at exit (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:98:27) at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:216:3) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:77:20 at cb (/usr/local/lib/node_modules/npm/lib/npm.js:225:22) at /usr/local/lib/node_modules/npm/lib/npm.js:263:24 at /usr/local/lib/node_modules/npm/lib/config/core.js:83:7 at Array.forEach () at /usr/local/lib/node_modules/npm/lib/config/core.js:82:13 at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25) at /usr/local/lib/node_modules/npm/lib/config/core.js:112:20 (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. TypeError: Cannot read property 'loaded' of undefined at process. (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:40:18) at process.emit (events.js:203:13) /usr/local/lib/node_modules/npm/lib/utils/error-handler.js:98 var doExit = npm.config.loaded ? npm.config.get('_exit') : true ^

TypeError: Cannot read property 'loaded' of undefined

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software