When in Windows, do as Windows does.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
In Windows, the root of the user directory (%USERPROFILE%) is NOT the right place to store application settings. This is a very common convention on Linux, but Windows != Linux and not all Windows users want to pretend they are running Linux. On Windows, the correct location for application settings is %APPDATA% and the correct location for cache/large data is %LOCALAPPDATA% or %PROGRAMDATA% (depending on level of security consciousness).
%USERPROFILE% is the root of the user's space on the hard drive, and it is meant to hold documents that the user explicitly writes there (e.g., via a save dialog box) and to hold top-level folders for organization such as Documents, Videos, Pictures, and the appropriately hidden AppData folder (which is the default location where applications should be storing their data).
Along with the organization problems that is caused by storing files in %USERPROFILE%, it also presents problems with roaming profiles and backup scripts as Windows and Windows tools do not automatically sync/backup everything in %USERPROFILE%. For example, %APPDATA% will be synced over the network/internet on login/logout while %LOCALAPPDATA% will not. By storing files in the correct folders, the application is more likely to "just work" for users working in different environments.
I believe that Linux actually now has a standard for environment variables similar to the Windows one, so I would encourage fixing Linux at the same time (and cease writing to $HOME when those are present) but I don't personally care about Linux as much. 😄 MacOS X also has a convention I believe, though I'm not sure what Docker CLI does there.
Output of docker version:
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:22:37 2019
OS/Arch: windows/amd64
Experimental: false
Contributor guide
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.
Research direction
Start by locating the Docker CLI code that writes application settings, cache, or large data under %USERPROFILE% or $HOME. Read how platform-specific environment variables are selected; done means Windows uses %APPDATA% and an appropriate local or shared data directory, while Linux honors the referenced XDG locations when present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100