admin管理员组文章数量:1399922
Strange one here that has been eating me alive for a solid 6 hours.
Dockerfile looks like this:
FROM mcr.microsoft/devcontainers/typescript-node:22-bullseye
WORKDIR /install
COPY /grcapp-vj/package.json /install/
RUN npm install
ENV NODE_PATH=/install/node_modules
ENV PATH /install/node_modules/.bin:$PATH
WORKDIR /grcapp-vj
COPY /grcapp-vj/ .
EXPOSE 8080
ENTRYPOINT npm run dev -- --host 0.0.0.0
When I run it, the appropriate port shows it is running, with no process description per below:
And when I try to load the app in the browser I get this error and the "Sources" tab of the inspection tools shows that none of the app has loaded.
Instead, if I run the same command npm run dev -- --host 0.0.0.0
from the terminal of the running container, as so:
The process has additional details:
Any the application loads perfectly.
Any help on this issue would be greatly appreciated.
本文标签:
版权声明:本文标题:node.js - npm run dev command does not work via RUNENTRYPOINTCMD in Dockerfile but works from terminal inside devcontainer - Sta 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744162881a2593418.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论