【发布时间】:2022-01-22 19:17:49
【问题描述】:
我已经使用以下 docker 文件创建了一个 docker 映像:
FROM node:current-alpine3.14
#install the http-server
RUN npm install -g ngx
# define working directory in docker linux environment
WORKDIR /app
# copy the builded app
COPY /dist/app /app
# start the http-server in the working directory
CMD ngx start
如果我使用以下命令运行 docker 映像:
docker run -p 3000:3000 myapp
我收到以下错误:
Error Error: .ngxrc not found
at OptionManager._callee2$ (/usr/local/lib/node_modules/ngx/lib/option-manager.js:184:23)
at tryCatch (/usr/local/lib/node_modules/ngx/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/usr/local/lib/node_modules/ngx/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.<computed> [as throw] (/usr/local/lib/node_modules/ngx/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/usr/local/lib/node_modules/ngx/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /usr/local/lib/node_modules/ngx/node_modules/babel-runtime/helpers/asyncToGenerator.js:30:13
我没有在网上找到有关错误的信息。
有人知道我做错了什么吗?
【问题讨论】: