|
FROM node:lts-alpine |
|
|
|
EXPOSE 3000 |
|
ENV TZ=Asia/Shanghai x-cursor-checksum=KTw+J6/C6ea601a055c2090e16663ae9925aad315ce9af6369fb196ce7a1ec7fa97a5fd3/a3daf769bf94dcd814dc8cfee46a097a1fa089fc4ec6dc12d0ec55c623c54d5d |
|
|
|
WORKDIR /app |
|
RUN apk add git |
|
RUN git clone https://github.com/zhx47/cursor-api.git . |
|
|
|
|
|
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"] |