wuhuizgptamd commited on
Commit
51b29ce
·
verified ·
1 Parent(s): e3fdbb7

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -16
Dockerfile CHANGED
@@ -1,22 +1,27 @@
1
- #
2
- # SPDX-FileCopyrightText: Hadad <[email protected]>
3
- # SPDX-License-Identifier: Apache-2.0
4
- #
5
 
6
- # Use a specific container image for the sever
7
- FROM hadadrjt/ai:latest
8
 
9
- # Set the main working directory inside the container
10
- WORKDIR /node
11
 
12
- # Copy all files into the container
13
- COPY . .
14
 
15
- # Install all dependencies
16
- RUN npm install
17
 
18
- # Open the port so the web can be accessed
19
- EXPOSE 7860
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- # Start the server
22
- CMD ["npm", "start"]
 
1
+ FROM node:trixie
 
 
 
2
 
3
+ WORKDIR /app
 
4
 
5
+ COPY * /app/
 
6
 
7
+ ENV PORT=7860
 
8
 
9
+ SHELL ["/bin/bash", "-c"]
 
10
 
11
+ RUN echo -e "\nTypes: deb\nURIs: http://deb.debian.org/debian\nSuites: trixie trixie-updates trixie-backports\nComponents: main contrib non-free non-free-firmware\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg" >> /etc/apt/sources.list.d/debian.sources &&\
12
+ apt-get update &&\
13
+ apt-get install -y git unzip curl wget gzip procps coreutils bash upx-ucl gnupg2 ca-certificates lsb-release debian-archive-keyring &&\
14
+ curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null &&\
15
+ echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | tee /etc/apt/sources.list.d/nginx.list &&\
16
+ echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | tee /etc/apt/preferences.d/99nginx &&\
17
+ apt-get update &&\
18
+ apt-get install -y nginx &&\
19
+ npm install -g pm2 &&\
20
+ npm install -g bash-obfuscate &&\
21
+ chmod -R 777 /app &&\
22
+ chmod -R 777 /var &&\
23
+ chmod -R 777 /run
24
+
25
+
26
 
27
+ ENTRYPOINT ["bash", "-c", "echo -e \"$RUN_BASE\" > /app/run.sh && chmod +x /app/run.sh && bash /app/run.sh"]