jesseduffield / jesseduffield/lazydocker

Cannot connect to docker using TLS

Open
#603 4 comments 3 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
52.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The docker client can connect to a remote daemon using TLS, which is often easier to setup than ssh. It would be great if this was supported by lazydocker.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a docker context using TLS:
```
docker context create my-context --docker "host=tcp://:2376,ca=,cert=,key=
docker use my-context
```
2. Launch lazydocker
3. We get the error `Docker event stream returned error: Error response from daemon: Client sent an HTTP request to an HTTPS`.

**Expected behaviour**
Lazydocker should connect to the daemon and work normally.

**Workaround**
Use `socat` to map the TLS socket to a local UNIX socket:
```
socat UNIX-LISTEN:/path-to/local.sock,reuseaddr,fork OPENSSL-CONNECT:,cert=,cafile=

DOCKER_HOST='unix:///path-to/local.sock' lazydocker
```

**Desktop (please complete the following information):**
```
Version: 0.24.1
Date: 2024-11-23T06:32:15Z
BuildSource: binaryRelease
Commit: be051153525b018a46f71a2b2ed42cde39a1110c
OS: linux
Arch: amd64
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.