eatYour commited on
Commit
56a346a
1 Parent(s): 61b9681

Upload 3 files

Browse files
Files changed (3) hide show
  1. Dockerfile +23 -21
  2. aria2.conf +6 -0
  3. start.sh +3 -0
Dockerfile CHANGED
@@ -1,21 +1,23 @@
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
-
6
- # Switch to the "user" user
7
- USER user
8
-
9
- # Set home to the user's home directory
10
- ENV HOME=/home/user \
11
- PATH=/home/user/.local/bin:$PATH
12
-
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/alist
19
- # CMD ["bash", "alist", "server"]
20
- CMD cd $HOME/alist && ./alist server
21
- EXPOSE 5244
 
 
 
1
+ FROM ubuntu:22.04
2
+ RUN apt-get update && apt-get install -y aria2
3
+ COPY aria2.conf /app/aria2.conf
4
+ # Set up a new user named "user" with user ID 1000
5
+ RUN useradd -m -u 1000 user
6
+
7
+ # Switch to the "user" user
8
+ USER user
9
+
10
+ # Set home to the user's home directory
11
+ ENV HOME=/home/user \
12
+ PATH=/home/user/.local/bin:$PATH
13
+
14
+ # Set the working directory to the user's home directory
15
+ WORKDIR $HOME/alist
16
+
17
+ COPY --chown=user . $HOME/alist
18
+ EXPOSE 5244
19
+ RUN chmod +x $HOME/alist/alist
20
+ # CMD ["bash", "alist", "server"]
21
+ COPY start.sh /app/start.sh
22
+ RUN chmod +x /app/start.sh
23
+ CMD ["/app/start.sh"]
aria2.conf ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # 启用 RPC 服务
2
+ enable-rpc=true
3
+ # RPC监听端口
4
+ rpc-listen-port=6800
5
+ # RPC 授权令牌,可自行设定
6
+ rpc-secret=eatyour
start.sh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ aria2c --conf-path=/app/aria2.conf &
2
+ # 启动 Cloudreve
3
+ cd $HOME/alist && ./alist server