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