【发布时间】:2016-06-18 17:51:03
【问题描述】:
我正在观看 Pluralsight 的 Docker 课程,我需要在刚刚下载的 Docker 容器上运行 Docker 源代码。
即使我在当前路径中有package.json 文件,它也无法识别。
Usuario@RE MINGW64 /d/node/ExpressSite
$ docker run -p 8080:3000 -v /$(pwd):/var/www -w "/var/www" node:4.4.5 npm start
npm info it worked if it ends with ok
npm info using npm@2.15.5
npm info using node@v4.4.5
npm ERR! Linux 4.4.12-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! path /var/www/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/var/www/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/npm-debug.log
为什么 Pluralsight 会做同样的事情并且有效?我的版本有什么问题?
【问题讨论】: