jeff86 commited on
Commit
596affe
1 Parent(s): c47d8d6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -2
Dockerfile CHANGED
@@ -1,7 +1,26 @@
1
- FROM vinlic/qwen-free-api:latest
2
- ENV TZ=Asia/Shanghai
 
 
 
 
3
  RUN chmod 777 /app
 
 
 
 
4
 
 
 
 
 
 
 
 
 
 
 
 
5
  EXPOSE 8000
6
 
7
  CMD ["npm", "start"]
 
1
+ FROM node:lts AS BUILD_IMAGE
2
+
3
+ WORKDIR /app
4
+
5
+ RUN git clone https://github.com/dark2star/qwen-free-api.git
6
+
7
  RUN chmod 777 /app
8
+ COPY ./qwen-free-api /app
9
+ RUN ls /app
10
+
11
+ RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
12
 
13
+ FROM node:lts-alpine
14
+
15
+ COPY --from=BUILD_IMAGE /app/configs /app/configs
16
+ COPY --from=BUILD_IMAGE /app/package.json /app/package.json
17
+ COPY --from=BUILD_IMAGE /app/dist /app/dist
18
+ COPY --from=BUILD_IMAGE /app/public /app/public
19
+ COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
20
+
21
+ WORKDIR /app
22
+
23
+ ENV TZ=Asia/Shanghai
24
  EXPOSE 8000
25
 
26
  CMD ["npm", "start"]