Update rootless.md#14727
Conversation
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
thaJeztah
left a comment
There was a problem hiding this comment.
Hm.. I think removing whole of .docker/ may be a bit of a large hammer. The ~/.docker/ directory contains all of the docker CLI configuration, so removing that could potentially delete other configs that may be important to the user. If this problem happens, the "correct" fix would be to update the ~/.docker/config.json file and to remove the currentContext property (so that the default context is used). This should not happen though (under normal circumstances), so would only be needed if something went wrong.
I had a look at the dockerd-rootless-setuptool.sh script, and current versions of the script should contain the changes of moby/moby#43020. With that change included, running dockerd-rootless-setuptool.sh uninstall should run a docker context rm -f rootless, which will remove the context, and switch back to using the "default" context (the docker context rm -f should remove the currentContext setting from ~/.docker/config.json);
- https://github.com/moby/moby/blob/v20.10.18/contrib/dockerd-rootless-setuptool.sh#L419-L422
- https://github.com/moby/moby/blob/v20.10.18/contrib/dockerd-rootless-setuptool.sh#L366-L369
If you're seeing the "Current context "rootless" is not found on the file system" error, that means that somehow the context itself was removed, but the ~/.docker/config.json was not updated, which should not happen if the script ran successfully, so I'm trying to come up with reasons why that could happen;
- If the
cli_ctx_existscheck failed, thecli_ctx_rmcommand wouldn't be executed cli_ctx_rmcurrently also looks to fail (even with-f/--force) if the current context is not found (something we should fix in the CLI)
Did you see an error when running the script?
|
Thanks for the pull request. We'd like to make our product docs better, but haven’t been able to review all the suggestions. If the updates are still relevant, review our contribution guidelines and rebase your pull request against the latest version of the docs, then mark it as fresh with a Prevent pull requests from auto-closing with a /lifecycle stale |
Proposed changes
After installing (and using) docker rootless, I had a ~/.docker directory that I needed to delete since I was getting
Current context "rootless" is not found on the file system, please check your config file at /home/docker/.docker/config.json