Update Dockerfile
Browse files- Dockerfile +4 -11
Dockerfile
CHANGED
@@ -9,23 +9,16 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
9 |
WORKDIR /app
|
10 |
|
11 |
# 2. 获取 OpenList 二进制文件
|
12 |
-
#
|
13 |
-
RUN apk add --no-cache
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
-
RUN LATEST_RELEASE_URL=$(curl -sL https://api.github.com/repos/OpenListTeam/OpenList/releases/latest | \
|
18 |
-
jq -r '.assets?[] | select(.name | test("openlist-linux-amd64.*\\.tar\\.gz$")) | .browser_download_url') && \
|
19 |
-
if [ -z "$LATEST_RELEASE_URL" ]; then echo "Error: Could not find 'openlist-linux-amd64.tar.gz' or similar asset in latest release." && exit 1; fi && \
|
20 |
-
echo "Downloading: openlist-linux-amd64.tar.gz from $LATEST_RELEASE_URL" && \
|
21 |
-
wget -q -O openlist-linux-amd64.tar.gz "$LATEST_RELEASE_URL"
|
22 |
|
23 |
# 3. 解压并授予执行权限
|
24 |
-
# 注意:这里需要确保解压的是正确的文件名
|
25 |
RUN tar -xzf openlist-linux-amd64.tar.gz
|
26 |
|
27 |
# 授予下载的 openlist 二进制文件执行权限
|
28 |
-
# 假设解压后会有一个名为 'openlist' 的可执行文件
|
29 |
RUN chmod +x openlist
|
30 |
|
31 |
# 4. 运行 OpenList 服务器
|
|
|
9 |
WORKDIR /app
|
10 |
|
11 |
# 2. 获取 OpenList 二进制文件
|
12 |
+
# wget 可能未预装,所以先安装它和 ca-certificates
|
13 |
+
RUN apk add --no-cache wget ca-certificates
|
14 |
|
15 |
+
# 下载 OpenList 的最新 release 版本
|
16 |
+
RUN wget -q -L https://github.com/OpenListTeam/OpenList/releases/download/beta/openlist-linux-amd64.tar.gz
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
# 3. 解压并授予执行权限
|
|
|
19 |
RUN tar -xzf openlist-linux-amd64.tar.gz
|
20 |
|
21 |
# 授予下载的 openlist 二进制文件执行权限
|
|
|
22 |
RUN chmod +x openlist
|
23 |
|
24 |
# 4. 运行 OpenList 服务器
|