Feature Request: Merge PATH env from both configs and registry hive
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- docker
- Domain
- infrastructure, operating-systems
Research direction
No files, tests, or code entry points are named in the issue. Start by locating the Windows container runtime path that combines image configuration with registry environment variables, then review the linked BuildKit issue for context. Done means an opt-in behavior that merges PATH values from both sources while preserving the existing default behavior.
Written by the indexing model from the issue text.
Description
This is a request carried over from this issue - https://github.com/moby/buildkit/issues/5445
Windows primarily gets the PATH environment variable from the registry. However, when the PATH is set in the image config, this will take precedence.
The problem arises with cases of installers and use of setx where the PATH in the registry is modified but the PATH in the config isn’t and the two copies slowly start diverging.
Linux on the other hand, has something that closely resembles what the registry hive does, where variables can be stored in file and loaded either manually or automatically when running the script. However, the advantage on the Linux end is that this PATH variable for instance gets merged basically by string interpolation. For instance if the PATH was set in the image:
ENV PATH="$PATH:/my/path"
And then if you have a script modifying the path:
export PATH=$PATH:/my/other/path
You end up having both /my/path and /my/other/path in the PATH.
NOTE: during container building, only the PATH set in the config is taken into consideration, unless you explicitly load the other PATH from script. If the PATH is set in say a
.bashrcscript, this will be automatically loaded when running in interactive bash shell.
The request: if Windows could consider (1) setting a default PATH config in the base images and (2) merging both PATH variable from config and registry during container run. For backward compatibility, this will need to be opt-in.
- Dominant language
- PowerShell
- Stars
- 551
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/Windows-Containers
-
enhancement triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/Windows-Containers#630 · 5 comments ·
-
bug triage
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoft/Windows-Containers#648 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
microsoft/Windows-Containers#647 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/Windows-Containers#646 · 2 comments · 1 reaction ·
-
bug triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/Windows-Containers#645 · 4 comments ·
All issues in microsoft/Windows-Containers
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
danielmiessler/LifeOS#2215 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·