[note] 修正 apache/airflow:2.10.2 Docker 映像中 Git 安裝問題
註記:此頁為由 AI(gpt-5-mini-2025-08-07)自動翻譯自英文原文,可能含有少量不準確之處。
📌 介紹
The article discusses the issue of permission errors when attempting to install packages from GitHub while using the apache/airflow:2.10.2 Docker image. It presents a solution that involves temporarily switching to the root user to install ‘git’ and then reverting to the airflow user for further installations.
🚀 快速開始
1 | FROM apache/airflow:slim-2.10.2 |
🔁 重點回顧
- 使用 apache/airflow:2.10.2 映像從 GitHub 安裝套件時,可能會發生權限錯誤。
- 為了解決此問題,請在切回 airflow 使用者之前,以 root 使用者身分安裝 git。
- 範例 Dockerfile 示範了執行這些操作的步驟。
[note] 修正 apache/airflow:2.10.2 Docker 映像中 Git 安裝問題