如何使用exec在现有的Docker容器上运行npm命令?

时间:2019-07-29 13:42:57

标签: node.js docker npm exec

我在docker上运行了本地Node(node:latest)映像(无法访问原始映像,只有在需要时我才能更改映像的标签)

我需要使用exec在该节点上调用“ npm install -g some_app”,但docker exec调用会导致

exec failed: container_linux.go:344: starting container process caused "exec: \"npm\": executable file not found in $PATH": unknown

有什么办法可以解决这个问题?

0 个答案:

没有答案
相关问题