Fetch the repository succeeded.
FROM node:12
RUN npm install pm2 -g --registry=https://registry.npm.taobao.org
WORKDIR /usr/src/app
COPY package*.json ./
# 安装cnpm 解决 install 慢的问题
#RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
#RUN cnpm install
RUN npm install --registry=https://registry.npm.taobao.org
COPY . .
EXPOSE 3000
RUN pm2 install pm2-logrotate
CMD [ "pm2", "start", "./bin/www", "--no-daemon", "--name", "gs" ]
Sign in for post a comment
Comment ( 0 )