cs2a / Dockerfile
ltxlong's picture
Update Dockerfile
08b7ad6 verified
raw
history blame
721 Bytes
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 .
# 这里外面的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"]