Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to docker using TLS #603

Open
chatziko opened this issue Dec 2, 2024 · 1 comment
Open

Cannot connect to docker using TLS #603

chatziko opened this issue Dec 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@chatziko
Copy link

chatziko commented Dec 2, 2024

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://<host>:2376,ca=<path>,cert=<path>,key=<path>
    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:<host>,cert=<path>,cafile=<path>

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
@chatziko chatziko added the bug Something isn't working label Dec 2, 2024
@MrPeacockNLB
Copy link

Same here. Just updated to docker to use TLS while insecure HTTP connections are being marked as deprecated in Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants