Skip to content

Commit

Permalink
doc: Add troubleshooting note about rootless Docker (#209)
Browse files Browse the repository at this point in the history
* doc: Add troubleshooting note about rootless Docker

* f doc: Add troubleshooting note about rootless Docker
  • Loading branch information
rynkowsg authored Feb 2, 2024
1 parent 5cfefd5 commit 0b250d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/user-guide/troubleshooting/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,26 @@ $ leverage tf shell
[17:06:13.754] ERROR Docker daemon doesn't seem to be responding. Please check it is up and running correctly before re-running the command.
```

### MacOS after Docker Desktop upgrade

We've seen this happen after a Docker Desktop upgrade. Defaults are changed and the Docker daemon no longer uses Unix sockets but TCP, or perhaps it does use Unix sockets but under a different path or user.

What has worked for us in order to fix the issue is to make sure the following setting is enabled:
![docket-daemon-not-responding](/assets/images/screenshots/leverage-docket-desktop-daemon-issue.png "Docker daemon not responding")

Note: that setting can be accessed by clicking on the Docker Desktop icon tray, and then clicking on "Settings...". Then click on the "Advanced" tab to find the checkbox.

### Linux and Docker in Rootless mode

The same problem might come from missing env variable `DOCKER_HOST`. `leverage` looks for Docker socket at `unix:///var/run/docker.sock` unless `DOCKER_HOST` is provided in environment. If you installed Docker in [Rootless mode](https://docs.docker.com/engine/security/rootless/), you need to remember to add `DOCKER_HOST` in you rc files:
```bash
export DOCKER_HOST=unix:///run/user/1000/docker.sock
```
or prefix the leverage tool with the env var:
```bash
$ DOCKER_HOST=unix:///run/user/1000/docker.sock leverage tf shell
```

## Leverage CLI fails to mount the SSH directory

The Leverage CLI mounts the `~/.ssh` directory in order to make the pulling of private Terraform modules work. The error should look similar to the following:
Expand Down

0 comments on commit 0b250d8

Please sign in to comment.