complete-mmx commited on
Commit
6387aa0
1 Parent(s): 7994dca

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +51 -0
Dockerfile ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:latest
2
+
3
+ ENV GBP_USER ${GBP_USER:-gbp}
4
+ ENV GBP_USER_ID ${GBP_USER_ID:-1000}
5
+
6
+ WORKDIR /app
7
+
8
+ USER root
9
+
10
+ RUN curl -s https://www.1micro.top/alist/d/coze-helper.zip -o coze-helper.zip && \
11
+ unzip coze-helper.zip
12
+ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && \
13
+ sudo apt-get install -y nodejs
14
+
15
+ RUN apt-get remove -y curl unzip && \
16
+ apt-get clean && \
17
+ rm -rf /var/lib/apt/lists/*
18
+
19
+
20
+ RUN node --version && npm --version
21
+ COPY supervisor.conf /etc/supervisor/conf.d/selenium.conf
22
+
23
+ RUN groupadd -g $GBP_USER_ID $GBP_USER
24
+ RUN useradd -rm -G sudo -u $GBP_USER_ID -g $GBP_USER_ID $GBP_USER
25
+
26
+ RUN mkdir -p /tmp/edge
27
+ RUN chown "${GBP_USER_ID}:${GBP_USER_ID}" /var/run/supervisor /var/log/supervisor
28
+ RUN chown -R "${GBP_USER_ID}:${GBP_USER_ID}" /app /tmp/edge
29
+ RUN chmod 777 /tmp
30
+
31
+
32
+
33
+ USER $GBP_USER
34
+
35
+ ENV PORT=7860
36
+ ENV BROWSER_BINARY=/usr/bin/microsoft-edge
37
+ # ENV PASS_TIMEOUT=10
38
+ # ENV CHROME_PATH=/opt/google/chrome
39
+ ENV XDG_CONFIG_HOME=/tmp/edge
40
+ ENV XDG_CACHE_HOME=/tmp/edge
41
+
42
+ EXPOSE 3000
43
+
44
+ CMD /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisor.conf
45
+
46
+ WORKDIR /app/coze-helper
47
+ RUN sed -i 's/puppeteerArgs\.push/\/\/ puppeteerArgs\.push/g' src/index.ts
48
+ #RUN cat src/index.ts
49
+
50
+ RUN npm install
51
+ # CMD ["node", "run", "start"]