eatYour commited on
Commit
fd9a8d6
·
verified ·
1 Parent(s): de369ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -28
Dockerfile CHANGED
@@ -1,29 +1,28 @@
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
- # Copy the start script and change its permissions
8
- COPY start.sh /app/start.sh
9
- COPY config.json /data/config.json
10
- RUN chmod +x /app/start.sh && mkdir /app/local
11
- # 加权限 /app/local
12
- RUN chmod 777 /app/local
13
- # Switch to the "user" user
14
- USER user
15
-
16
- # Set home to the user's home directory
17
- ENV HOME=/home/user \
18
- PATH=/home/user/.local/bin:$PATH
19
-
20
- # Set the working directory to the user's home directory
21
- WORKDIR $HOME/alist
22
- RUN mkdir -p $HOME/alist/data
23
- COPY config.json $HOME/alist/data/config.json
24
-
25
- COPY --chown=user . $HOME/alist
26
- EXPOSE 7860
27
- RUN chmod +x $HOME/alist/alist
28
- # CMD ["bash", "alist", "server"]
29
  CMD ["/app/start.sh"]
 
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
+ # Copy the start script and change its permissions
8
+ COPY start.sh /app/start.sh
9
+ COPY config.json /data/config.json
10
+ RUN chmod +x /app/start.sh && mkdir /app/local
11
+ # 加权限 /app/local
12
+ RUN chmod 777 /app/local
13
+ # Switch to the "user" user
14
+ USER user
15
+
16
+ # Set home to the user's home directory
17
+ ENV HOME=/home/user \
18
+ PATH=/home/user/.local/bin:$PATH
19
+
20
+ # Set the working directory to the user's home directory
21
+ WORKDIR $HOME/alist
22
+ RUN mkdir -p $HOME/${app}/data
23
+ COPY config.json $HOME/${app}/data/config.json
24
+
25
+ COPY --chown=user . $HOME/${app}
26
+ EXPOSE 7860
27
+ RUN chmod +x $HOME/${app}/${app}
 
28
  CMD ["/app/start.sh"]