File size: 721 Bytes
daf791e da0682b daf791e 10991e9 e67b47f daf791e 00fedd5 10991e9 daf791e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
FROM node:lts-alpine
EXPOSE 3000
ENV TZ=Asia/Shanghai x-cursor-checksum=JLW3sDWq1dba548430e9e47ed8b290f973b3814d91f2a0c9bff5eaea63978223a18a2c32/abf905fd16e487569677d4632148bc1e457977b68337ff091504d4873ea9f77d
WORKDIR /app
RUN apk add git
RUN git clone https://github.com/zhx47/cursor-api.git .
# 这里外面的utils.js是调试打印日志的作用,并且版本不是最新的
#ADD utils.js src/
RUN yarn config set registry https://registry.npmmirror.com/
RUN yarn
RUN sed -i 's/\/v1\/chat\/completions/\/hf\/v1\/chat\/completions/g' src/index.js
RUN sed -i '/\/\/ 启动服务器/c\app.get("/", async (req, res) => {\n return res.status(200).send("hello world!");\n});' src/index.js
CMD ["npm", "run", "start"] |