OpenCC-API / Dockerfile
hsukqilee's picture
Create Dockerfile
33d757b verified
raw
history blame contribute delete
406 Bytes
# 使用官方的 Node.js 镜像作为基础镜像
FROM node:14
# 确保有 git
RUN apt-get update && apt-get install -y git
# 设置工作目录
WORKDIR /app
# 克隆仓库并安装依赖
RUN git clone https://github.com/HenryQW/OpenCC.henry.wang.git /app \
&& npm install --production
# 设置环境变量
ENV PORT=7860
# 暴露端口 7860
EXPOSE 7860
# 启动应用程序
CMD ["npm", "start"]