123456789101112131415161718192021222324 |
- FROM node:lts-alpine as builder
- #环境变量写在build后面否则找不到指令
- ENV PROJECT_ENV production
- ENV NODE_ENV production
- ENV NODE_OPTIONS=--openssl-legacy-provider
- RUN export NODE_OPTIONS
- # 设置时区
- #RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- #RUN echo 'Asia/Shanghai' >/etc/timezone
- WORKDIR /code
- ADD package.json /code
- RUN npm install
- ADD . /code
- EXPOSE 7002
- CMD npm start
|