tang minghao commited on
Commit
48756f9
·
verified ·
1 Parent(s): 272586b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -15
Dockerfile CHANGED
@@ -1,15 +1,21 @@
1
- FROM ubuntu:latest
2
- LABEL MAINTAINER="xx"
3
- WORKDIR /opt/tinyproxy/
4
- COPY ./tinyproxy /opt/tinyproxy/tinyproxy
5
- COPY ./tinyproxy.conf /opt/tinyproxy/tinyproxy.conf
6
- COPY ./debug.html /opt/tinyproxy/data/debug.html
7
- COPY ./default.html /opt/tinyproxy/data/default.html
8
- COPY ./stats.html /opt/tinyproxy/data/stats.html
9
- COPY ./entrypoint.sh /entrypoint.sh
10
-
11
- RUN chmod +x /entrypoint.sh
12
-
13
- ENV PUID=0 PGID=0 UMASK=022 TZ=Asia/Shanghai
14
- EXPOSE 8888
15
- CMD ["/entrypoint.sh" ]
 
 
 
 
 
 
 
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
+ FILE_SYNC=$FILE_SYNC\
12
+ PATH=/home/user/.local/bin:$PATH
13
+
14
+ # Set the working directory to the user's home directory
15
+ WORKDIR $HOME/tinyproxy
16
+
17
+ COPY --chown=user . $HOME/tinyproxy
18
+
19
+ RUN chmod +x $HOME/alist/alist
20
+ CMD cd $HOME/tinyproxy && ./tinyproxy -d -c ./tinyproxy.conf
21
+ EXPOSE 8888