ykl45 commited on
Commit
55b9065
·
verified ·
1 Parent(s): 16179f2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -4,26 +4,26 @@ FROM golang:alpine AS builder
4
  # 安装必要的工具
5
  RUN apk update && apk add --no-cache \
6
  curl \
7
- unzip
8
 
9
  # 创建新的工作目录
10
  WORKDIR /app
11
 
12
 
13
  # 下载并解压文件,并给予所有用户读写和执行权限
14
- RUN --mount=type=secret,id=ZIP_PASSWD,dst=/etc/secrets/ZIP_PASSWD \
15
  version=$(basename $(curl -sL -o /dev/null -w %{url_effective} https://github.com/wozulong/Palaude/releases/latest)) \
16
  && base_url="https://github.com/wozulong/Palaude/releases/expanded_assets/$version" \
17
  && latest_url="https://github.com/$(curl -sL $base_url | grep "href.*linux-amd64*\.zip" | sed 's/.*href="//' | sed 's/".*//')" \
18
  && curl -Lo palaude.zip $latest_url \
19
- && unzip -j -P $(cat /run/secrets/ZIP_PASSWD) palaude.zip \
20
  && rm palaude.zip \
21
  && chmod 777 -R .
22
 
23
 
24
  # 获取config.json
25
- RUN --mount=type=secret,id=CONFIG_JSON,dst=/etc/secrets/CONFIG_JSON \
26
- cat /etc/secrets/CONFIG_JSON > config.json && chmod 777 config.json
27
 
28
  # 修改PandoraNext的执行权限
29
  RUN chmod 777 ./palaude
 
4
  # 安装必要的工具
5
  RUN apk update && apk add --no-cache \
6
  curl \
7
+ p7zip
8
 
9
  # 创建新的工作目录
10
  WORKDIR /app
11
 
12
 
13
  # 下载并解压文件,并给予所有用户读写和执行权限
14
+ RUN --mount=type=secret,id=ZIP_PASSWD,mode=0444,required=true \
15
  version=$(basename $(curl -sL -o /dev/null -w %{url_effective} https://github.com/wozulong/Palaude/releases/latest)) \
16
  && base_url="https://github.com/wozulong/Palaude/releases/expanded_assets/$version" \
17
  && latest_url="https://github.com/$(curl -sL $base_url | grep "href.*linux-amd64*\.zip" | sed 's/.*href="//' | sed 's/".*//')" \
18
  && curl -Lo palaude.zip $latest_url \
19
+ && p7zip e palaude.zip -p$(cat /run/secrets/ZIP_PASSWD) \
20
  && rm palaude.zip \
21
  && chmod 777 -R .
22
 
23
 
24
  # 获取config.json
25
+ RUN --mount=type=secret,id=CONFIG_JSON,mode=0444,required=true \
26
+ cat /run/secrets/CONFIG_JSON > config.json && chmod 777 config.json
27
 
28
  # 修改PandoraNext的执行权限
29
  RUN chmod 777 ./palaude