Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +29 -1
Dockerfile
CHANGED
@@ -1 +1,29 @@
|
|
1 |
-
FROM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM node:lts AS BUILD_IMAGE
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
# 更新软件包源,安装git,然后删除不再需要的包和缓存
|
6 |
+
RUN apt-get update && \
|
7 |
+
apt-get install -y git && \
|
8 |
+
git clone https://github.com/LLM-Red-Team/qwen-free-api.git /app && \
|
9 |
+
apt-get remove -y git && \
|
10 |
+
apt-get autoremove -y
|
11 |
+
|
12 |
+
RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
|
13 |
+
|
14 |
+
FROM node:lts-alpine
|
15 |
+
|
16 |
+
|
17 |
+
COPY --from=BUILD_IMAGE /app/configs /app/configs
|
18 |
+
COPY --from=BUILD_IMAGE /app/package.json /app/package.json
|
19 |
+
COPY --from=BUILD_IMAGE /app/dist /app/dist
|
20 |
+
COPY --from=BUILD_IMAGE /app/public /app/public
|
21 |
+
COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
|
22 |
+
|
23 |
+
WORKDIR /app
|
24 |
+
|
25 |
+
RUN chmod -R 777 /app
|
26 |
+
|
27 |
+
EXPOSE 8000
|
28 |
+
|
29 |
+
CMD ["npm", "start"]
|