我已经创建了一个本地节点快速应用程序,现在我正在尝试通过Docker运行节点应用程序。
docker run -p 8080:3000 -v $(pwd):/var/www -w "/var/www" node npm start
npm info it worked if it ends with ok
npm info using npm@5.0.3
npm info using node@v8.1.2
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 related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
主持人:MAC 使用Docket工具箱创建容器。
应用程序在本地运行,但不能通过docker启动。
有什么想法吗? docker inspect<>显示挂载
"Mounts": [
{
"Type": "bind",
"Source": "/Jsapp/ExpressSite",
"Destination": "/var/www",
"Mode": "",
"RW": true,
"Propagation": ""