瀏覽代碼

fix(docker): 修复 Ubuntu 24.04 缺少 pip 命令的问题

- 安装 python3-pip 和 python3-venv
- pip install → python3 -m pip install --break-system-packages
kinglee 2 周之前
父節點
當前提交
f2fa3dcd96
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      pack/Dockerfile

+ 3 - 2
pack/Dockerfile

@@ -78,7 +78,8 @@ RUN <<EOF
         iproute2 iputils-ping ifstat net-tools dnsutils pciutils ipmitool \
         procps sysstat htop \
         vim jq bc tree \
-        logrotate cron netcat-openbsd
+        logrotate cron netcat-openbsd \
+        python3-pip python3-venv
 
     # Update locale
     localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
@@ -253,7 +254,7 @@ hatchling
 py-spy
 poetry
 EOT
-    pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple -r /tmp/requirements.txt
+    python3 -m pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --break-system-packages -r /tmp/requirements.txt
 
     # Cleanup
     rm -rf /var/tmp/* \