Spaces:
coolmanx
/
Running

coolmanx commited on
Commit
34f20c9
·
verified ·
1 Parent(s): dcd55dc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile CHANGED
@@ -1,5 +1,16 @@
1
  FROM ubuntu:22.04
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  # Set up a new user named "user" with user ID 1000
4
  RUN useradd -m -u 1000 user
5
 
@@ -13,6 +24,30 @@ ENV HOME=/home/user \
13
  # Set the working directory to the user's home directory
14
  WORKDIR $HOME/alist
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  COPY --chown=user . $HOME/alist
17
 
18
  RUN chmod +x $HOME/alist/tvbox
 
1
  FROM ubuntu:22.04
2
 
3
+ # Install necessary tools
4
+ RUN apt-get update && apt-get install -y \
5
+ tar \
6
+ gzip \
7
+ file \
8
+ jq \
9
+ curl \
10
+ sed \
11
+ aria2 \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
  # Set up a new user named "user" with user ID 1000
15
  RUN useradd -m -u 1000 user
16
 
 
24
  # Set the working directory to the user's home directory
25
  WORKDIR $HOME/alist
26
 
27
+ # Create data/config.json file with database configuration
28
+ RUN echo '{\
29
+ "force": false,\
30
+ "address": "0.0.0.0",\
31
+ "port": 5244,\
32
+ "scheme": {\
33
+ "https": false,\
34
+ "cert_file": "",\
35
+ "key_file": ""\
36
+ },\
37
+ "cache": {\
38
+ "expiration": 60,\
39
+ "cleanup_interval": 120\
40
+ },\
41
+ "database": {\
42
+ "type": "mysql",\
43
+ "host": "ENV_MYSQL_HOST",\
44
+ "port": ENV_MYSQL_PORT,\
45
+ "user": "ENV_MYSQL_USER",\
46
+ "password": "ENV_MYSQL_PASSWORD",\
47
+ "name": "ENV_MYSQL_DATABASE"\
48
+ }\
49
+ }' > $HOME/alist/data/config.json
50
+
51
  COPY --chown=user . $HOME/alist
52
 
53
  RUN chmod +x $HOME/alist/tvbox