Files
clean-chrome/server/Dockerfile

18 lines
402 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM node:18-slim
# 安装基本运行环境Debian slim 版通常有预编译的 sqlite3 二进制包,速度极快)
WORKDIR /app
RUN mkdir -p /app/data
# 强制安装不从源码编译的 sqlite3 以节省时间
RUN npm install express cors sqlite3 --build-from-source=false
# 复制服务端源码
COPY server.js .
# 暴露 3000 端口
EXPOSE 3000
# 启动服务
CMD ["node", "server.js"]