ElderlyCare-MockServer/Dockerfile

19 lines
271 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 使用官方 Node 镜像
FROM node:18
# 设置容器内工作目录
WORKDIR /app
# 拷贝依赖清单
COPY package*.json ./
# 安装依赖
RUN npm install
# 拷贝项目文件
COPY . .
# 启动服务(默认端口为 3000
EXPOSE 3000
CMD ["node", "server.js"]