-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move .dockercfg to $XDG_CONFIG_HOME (a.k.a. ~/.config) #20693
Comments
Docker it's now using Overall I think this makes sense btw, I'm willing to propose a PR to do this ping @thaJeztah |
IIRC, there has been a discussion on that, but I don't remember why it wasn't done at the time |
#3068 (comment) is the oldest reference I can find |
Reading through that, I can honestly say that I've seen more CLI apps use Do you think the migration would be manageable, @runcom? Alex does make a good point there about actually following the spec (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html), not just swapping our hard-coded |
I would ❤️ that too 😝 |
Thanks for searching @tianon; that was exactly the discussion I had in mind. I know at the time the discussion was about daemon config and client-config; do we still use ~/.docker for daemon options actually? |
I think it will, @vdemeester wanna take a look? 👼 |
All right, #dibs on it 😝 |
Haha |
no we don't afaict |
$ ls -l ~/.docker/
total 4
-rw------- 1 tianon tianon 766 Feb 17 19:47 config.json No more |
thanks for checking @tianon |
ping @thaJeztah @vdemeester for update |
Assigning this to myself… had a little of work before 1.12. I should rebase and restart from there 👼 |
How do you see this playing out in terms of how files will be split into XDG_DATA_HOME, XDG_CACHE_HOME, and XDG_CONFIG_HOME? For example, the machines folder that I have in my |
I'd consider config your tls certs, your config.json. Your machines would be data, the b2d iso too. Cache would be cache obviously. You can always separately version-control both, or have an additional |
Is there any roadmap of this issue? |
I'm guessing there's still no movement on this? ~/.docker is not the first choice to have this. the correct approach should be ...
we shouldn't be spamming the users home directory when there's a perfectly good solution here |
Docker reads I have the following {
"auths": {
"https://index.docker.io/v1/": {},
"registry.gitlab.com": {}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/19.03.3 (linux)"
},
"credsStore": "secretservice"
} I do recall having to delete |
I think it's currently only used when using rootless mode, in which case it was used to set |
There was a pull request to implement this (#30025), but it needed more work and discussion #30025 (comment)
While using So, thinks to discuss;
|
Note, that according to the specification, there's no |
The setup experience could be improved if Docker would support XDG. I think this could be a good priority flow:
As for Mac, I think sticking to the OS convention is a sensitive thing to do. That is probably what best works with other tools. If a Mac user requires Linux-like behavior, then they can just spin up a Linux container ;) |
Thanks for your input! Yes, I think those suggestions (at least in broad lines) align with my train of thought. For the "macOS" case, I'm still contemplating the "best of both worlds" approach; actual content can be stored in system "native" paths ( Re-designing configuration paths has been slightly upped in my teams backlog (we still have many other things, so no ETA yet), as it's a recurring topic, and with the introduction of many new components ((IDE) integrations, CLI plugins, contexts, CLI plugins keeping their own state) has become more problematic (e.g. situations where config-directories are mounted into containers, IDEs attempting to temporarily override configuration options). I anticipate we'll start working on some rough / initial designs for this (including migration paths) in the not-too-distant future. |
Right now Docker saves its configuration in
$HOME/.dockercfg
file by default. This pollutes the home dir and disables chances of version-controlling the config directory.Please move config files to
$XDG_CONFIG_HOME/docker/<whatever>
to follow the Freedesktop guidelines.The text was updated successfully, but these errors were encountered: