HuggingFace0920 commited on
Commit
b1c9d0a
·
verified ·
1 Parent(s): 1d5f5a4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -9
Dockerfile CHANGED
@@ -6,19 +6,23 @@ EXPOSE 5244
6
  ENV TZ=Asia/Shanghai
7
  RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
8
  echo $TZ > /etc/timezone
9
-
 
 
 
 
 
10
  # 设置工作目录
11
  WORKDIR /OpenList
12
 
13
- # 下载 OpenList
14
- RUN wget -q https://github.com/OpenListTeam/OpenList/releases/download/beta/openlist-linux-amd64.tar.gz
15
-
16
- # 解压 OpenList
17
- RUN 7z x openlist-linux-amd64.tar.gz -o/OpenList/ && \
18
  rm -f openlist-linux-amd64.tar.gz
19
 
20
- # 设置目录权限
21
- RUN chmod -R 777 /OpenList
 
22
 
23
  # 启动服务
24
- CMD ["./openlist","server"]
 
6
  ENV TZ=Asia/Shanghai
7
  RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
8
  echo $TZ > /etc/timezone
9
+
10
+ # 安装依赖并清理
11
+ RUN apt-get update && \
12
+ apt-get install -y wget tar && \
13
+ rm -rf /var/lib/apt/lists/*
14
+
15
  # 设置工作目录
16
  WORKDIR /OpenList
17
 
18
+ # 下载并解压 OpenList
19
+ RUN wget -q https://github.com/OpenListTeam/OpenList/releases/download/beta/openlist-linux-amd64.tar.gz && \
20
+ tar -xzf openlist-linux-amd64.tar.gz --strip-components=1 -C . && \
 
 
21
  rm -f openlist-linux-amd64.tar.gz
22
 
23
+ # 设置安全权限 (按需调整)
24
+ RUN chmod 755 /OpenList && \
25
+ chmod 755 /OpenList/openlist
26
 
27
  # 启动服务
28
+ CMD ["./openlist", "server"]