From 9227111abb38f09c88d9fd1e93b93f01caa8aa38 Mon Sep 17 00:00:00 2001 From: xiao Date: Tue, 17 Dec 2024 23:28:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20Dockerfile=20?= =?UTF-8?q?=E4=BB=A5=E4=BC=98=E5=8C=96=E8=99=9A=E6=8B=9F=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=AE=BE=E7=BD=AE=E5=92=8C=E7=AC=A6=E5=8F=B7?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4e93168..529ac37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,10 +7,11 @@ RUN apk update && apk upgrade \ # 创建虚拟环境并激活 RUN python3 -m venv /www/server/panel/pyenv -ENV PATH="/www/server/panel/pyenv/bin:$PATH" +ENV pyenv_path="/www/server/panel/pyenv" +ENV PATH="$pyenv_path/bin:$PATH" # 确保虚拟环境中的python和pip具有执行权限 -RUN chmod -R 755 /www/server/panel/pyenv/bin/ +RUN chmod -R 755 $pyenv_path/bin/ # 安装Python和pip包 RUN pip install --upgrade pip \ @@ -19,8 +20,8 @@ RUN pip install --upgrade pip \ && pip install Pillow -U # 创建符号链接 -RUN ln -sf /www/server/panel/pyenv/bin/pip3 /usr/bin/btpip \ - && ln -sf /www/server/panel/pyenv/bin/python3 /usr/bin/btpython +RUN ln -sf $pyenv_path/bin/pip3 /usr/bin/btpip \ + && ln -sf $pyenv_path/bin/python3 /usr/bin/btpython # 复制脚本 COPY ["bt.sh", "init_mysql.sh", "install_panel.sh", "/"]