You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
267 B
Docker
15 lines
267 B
Docker
5 months ago
|
# 使用Node.js作为基础镜像
|
||
|
FROM node:latest
|
||
|
|
||
|
# 设置工作目录
|
||
|
WORKDIR /app
|
||
|
|
||
|
# 将应用的源代码复制到工作目录
|
||
|
COPY . /app
|
||
|
|
||
|
# 暴露应用使用的端口
|
||
|
EXPOSE 3000 8080
|
||
|
|
||
|
# 启动应用
|
||
|
# 服务端
|
||
|
CMD nohup sh -c 'npm run prod && npm run serve'
|