# Repair Docker after removing Docker Desktop

> For the complete documentation index, see [llms.txt](https://docs.ringleader.dev/llms.txt).


> Get docker pull, docker compose and docker buildx working again after you remove Docker Desktop from a Mac or a Windows PC.


Get `docker pull`, `docker compose` and `docker buildx` working again after you remove Docker
Desktop from a Mac or a Windows PC. Removing Docker Desktop can leave two Docker settings
pointing into the application you deleted, and both stop `docker` before it reaches any
runtime.

## Prerequisites

- [Ringleader installed](https://docs.ringleader.dev/install/) on a Mac or a Windows PC.
- One of these symptoms after you removed Docker Desktop:
  - Every `docker pull` fails with an error like
    `error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH`.
    Your Docker configuration still names Docker Desktop's sign-in helper, and the helper went
    with the application.
  - Docker can't find `docker compose` or `docker buildx`, because the plugin folder they were
    installed to is gone.

## Repair Docker's settings

If you create the [local container runtime](https://docs.ringleader.dev/reference/local-container-runtime/)
after removing Docker Desktop, `rl local-runtime create` runs this repair for you. To run only
the repair, follow these steps:

1. Run:

   ```bash
   rl local-runtime repair-docker
   ```

   The command changes a setting only when it is clearly broken, and saves the old
   configuration as `config.json.pre-ringleader` beside it. It does nothing when nothing is broken.
2. Check that Docker finds its plugins. `docker compose version` and `docker buildx version` each
   print a version. With a Docker runtime running, such as the local runtime, `docker pull` no
   longer fails with `error getting credentials`.
3. Optional: if Docker no longer has a sign-in you had, run `docker login` for that registry
   again. Sign-ins that Docker Desktop's helper saved may need a new `docker login`.

In the application, the same problem shows as **Docker needs a repair**. Click **Fix** to run
the repair. [`rl local-runtime repair-docker`](https://docs.ringleader.dev/reference/cli/commands/local-runtime/#rl-local-runtime-repair-docker)
says what the repair changes.

## Undo the repair

Removing Ringleader removes its sign-in helper and leaves your Docker configuration alone. A
configuration the repair changed then still names `ringleader`, and every `docker pull` fails
with the same error. To undo the change, do one of these:

- Put the saved file back as `config.json`: `~/.docker/config.json.pre-ringleader` on a Mac,
  or `%USERPROFILE%\.docker\config.json.pre-ringleader` on Windows. That brings back the
  configuration as it was when the backup was first saved.
- Change `credsStore` in `config.json` to a helper that is installed, then run `docker login`
  again.

## Troubleshoot

- If you created the local runtime and `rl local-runtime status` prints a `Repair:` line, a Docker
  setting is still broken. The line names the setting and ends in
  `(fix: rl local-runtime repair-docker)`. Run that command.
- If status says `Runtime: not created`, it can't check Docker. Run
  `rl local-runtime repair-docker` again.

## Next steps

- [Run containers with the local container runtime](https://docs.ringleader.dev/guides/run-local-container-runtime/)
  runs containers on your computer in place of Docker Desktop.
- [Local runtime](https://docs.ringleader.dev/reference/cli/commands/local-runtime/) lists every form of the
  `rl local-runtime` command.
- [Uninstall Ringleader](https://docs.ringleader.dev/guides/uninstall-ringleader/) removes Ringleader and
  says what it leaves in your Docker configuration.

