KL-MLC commited on
Commit
65ea34a
·
verified ·
1 Parent(s): f831b85

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -12
Dockerfile CHANGED
@@ -1,18 +1,38 @@
1
- FROM luanyaolingwu/alpinemirai:0.0.1-mcl2.1.2-20230714-noadapter-noqsign
 
 
 
 
 
 
 
 
 
 
2
 
3
- WORKDIR /test
 
 
 
 
 
4
 
 
 
 
 
 
 
 
 
 
 
5
  COPY . .
6
 
7
- RUN apk add nodejs npm curl p7zip git python3 make \
8
- && npm install pnpm -g
 
9
 
10
- # 修改目录权限
11
- RUN mkdir /.npm && chown -R 1000:0 "/.npm" && chown -R 1000:0 "./" && chmod -R 755 "./" \
12
- && mkdir /.cache && chown -R 1000:0 "/.cache"
13
 
14
- # 暴露端口
15
- EXPOSE 7860
16
- RUN ls /test
17
- # 启动APP
18
- CMD ["sh", "./initApplication.sh"]
 
1
+ # Use the official Node.js 16 image as the base image
2
+ FROM node:16
3
+ RUN chmod 1777 /tmp
4
+ # Install necessary dependencies for running Chrome
5
+ RUN apt-get update && apt-get install -y \
6
+ wget \
7
+ gnupg \
8
+ ca-certificates \
9
+ apt-transport-https \
10
+ xvfb \
11
+ && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Install Google Chrome
14
+ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
15
+ && echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
16
+ && apt-get update \
17
+ && apt-get install -y google-chrome-stable \
18
+ && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Set up the working directory in the container
21
+ WORKDIR /app
22
+
23
+ # Copy package.json and package-lock.json to the working directory
24
+ COPY package*.json ./
25
+
26
+ # Install Node.js dependencies
27
+ RUN npm install
28
+
29
+ # Copy the rest of the application code
30
  COPY . .
31
 
32
+ # Expose the port your app runs on
33
+ EXPOSE 8080
34
+ RUN export PASSWORD=$PASS && echo $B64JS | base64 -d > config.mjs
35
 
36
+ # Command to run the application
 
 
37
 
38
+ CMD [ "node", "index.mjs" ]