19 lines
411 B
Docker
19 lines
411 B
Docker
FROM node:10
|
|
|
|
# 定位进入容器项目文件夹
|
|
WORKDIR /home/node
|
|
# 拷贝宿主项目到容器
|
|
COPY . .
|
|
# 初始化项目
|
|
# RUN npm install -g cnpm
|
|
# RUN apt-get update && apt-get install net-tools
|
|
# RUN apt-get update && apt-get install lsof
|
|
# RUN apt-get update && apt-get install vim -y
|
|
|
|
RUN npm install
|
|
#RUN cnpm install -g node-dev
|
|
# 绑定端口
|
|
EXPOSE 3000
|
|
|
|
# 启动网站
|
|
CMD [ "node", "./bin/www" ] |