kingtest commited on
Commit
5dc8857
·
verified ·
1 Parent(s): 2807364

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:lts AS BUILD_IMAGE
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apk add --no-cache git && \
6
+ git clone https://github.com/LLM-Red-Team/glm-free-api.git /app && \
7
+ apk del git
8
+
9
+ RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
10
+
11
+ FROM node:lts-alpine
12
+
13
+ COPY --from=BUILD_IMAGE /app/configs /app/configs
14
+ COPY --from=BUILD_IMAGE /app/package.json /app/package.json
15
+ COPY --from=BUILD_IMAGE /app/dist /app/dist
16
+ COPY --from=BUILD_IMAGE /app/public /app/public
17
+ COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
18
+
19
+ WORKDIR /app
20
+
21
+ EXPOSE 8000
22
+
23
+ CMD ["npm", "start"]