eatYour commited on
Commit
54c9a40
·
verified ·
1 Parent(s): 9908831

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -20
Dockerfile CHANGED
@@ -1,28 +1,13 @@
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/${app}
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"]
 
1
  FROM ubuntu:22.04
2
  RUN apt-get update && apt-get install -y aria2
 
 
 
3
 
4
+ WORKDIR /app
5
+ COPY . .
6
+ RUN chmod +x start.sh && mkdir -p local && chmod 777 local
 
 
 
 
 
7
 
 
 
 
8
 
9
+ RUN mkdir -p ${app}/data
 
 
 
10
 
 
11
  EXPOSE 7860
12
+ RUN chmod +x ${app}
13
  CMD ["/app/start.sh"]