# 以他的 Node.js 项目为例 FROM node:18-alpine # 设置工作目录 WORKDIR /app # 克隆项目(替换为你想要的具体仓库名) RUN apk add --no-cache git RUN git clone https://github.com/Alishahryar1/Free-API.git . # 安装依赖 RUN npm install # 关键:确保端口是 7860 ENV PORT=7860 EXPOSE 7860 # 启动 CMD ["npm", "start"]