docker-library / docker-library/python
duplicate path in $PATH
還沒有人認領這個 Issue。
- 主要語言
- Dockerfile
- 星號
- 2.8k
- 分支
- 1.1k
- 平均合併
- 3 天 1 小時
- 30 天內合併 PR
- 1
描述
Minor nit. We blindly prepend /usr/local/bin onto the $PATH without looking to see if it's already there. This leads to duplication.
docker run --rm -it python:3.12-slim
Python 3.12.1 (main, Jan 11 2024, 10:03:43) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['PATH']
'/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
Expected output: /usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
Or possibly the original path is fine? Since /usr/local/sbin already occurs before /usr/bin and /bin.
This applies to all the base images in here. They all come with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin for the root user.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先在儲存庫中搜尋 Python 基礎映像定義 PATH 的位置,然後將該值與提供的 docker run 和 Python 指令所顯示的環境進行比較。完成的標準是,受影響的映像不再重複包含 /usr/local/bin,同時保留預期的路徑順序。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- docker, python
- 領域
- devops
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100