Skip to content

Update rootless.md#14727

Closed
delanym wants to merge 1 commit intodocker:mainfrom
delanym:patch-1
Closed

Update rootless.md#14727
delanym wants to merge 1 commit intodocker:mainfrom
delanym:patch-1

Conversation

@delanym
Copy link
Copy Markdown

@delanym delanym commented May 12, 2022

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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2022

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit a657432
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/627cfea802f84f0008443be4
😎 Deploy Preview https://deploy-preview-14727--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@dockertopia dockertopia added the area/engine Issue affects Docker engine/daemon label Jul 8, 2022
@thaJeztah thaJeztah added the area/cli Relates to the CLI client label Sep 28, 2022
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

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_exists check failed, the cli_ctx_rm command wouldn't be executed
  • cli_ctx_rm currently 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?

@docker-robott
Copy link
Copy Markdown
Collaborator

Thanks for the pull request. We'd like to make our product docs better, but haven’t been able to review all the suggestions.
As our docs have also diverged, we do not have the bandwidth to review and rebase old pull requests.

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 /remove-lifecycle stale comment.
If not, this pull request will be closed in 30 days. This helps our maintainers focus on the active pull requests.

Prevent pull requests from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Relates to the CLI client area/engine Issue affects Docker engine/daemon lifecycle/stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants