Skip to content

EOF error when streaming Docker events over SSH context #815

Description

@Gex2501

Describe the bug

Lazydocker fails when connected to a remote Docker Engine via a Docker SSH context. The Docker CLI works correctly (docker ps, docker events, etc.), but Lazydocker reports an error when subscribing to the Docker events stream.

Error displayed:

Docker event stream returned error:
error during connect:
Get "http://%2Ftmp%2Flazydocker-sshtunnel-XXXXXXXX/dockerhost.sock/v1.51/events":
EOF

The container list loads successfully, but the event stream disconnects shortly afterward.

To Reproduce

  1. Create a Docker context that connects to a remote Docker host over SSH:

    docker context create AORUS --docker "host=ssh://AORUS"
    docker context use AORUS
  2. Verify the Docker context works:

    docker ps
    docker events

    Both commands work correctly.

  3. Launch Lazydocker:

    lazydocker
  4. Observe the error:

    Docker event stream returned error:
    error during connect:
    Get "http://%2Ftmp%2Flazydocker-sshtunnel-XXXXXXXX/dockerhost.sock/v1.51/events":
    EOF
    

Expected behaviour

Lazydocker should connect to the remote Docker Engine and maintain the Docker events stream without errors, just as the Docker CLI does.

Screenshots

I can provide screenshots if needed. The error is displayed in the Lazydocker UI and references the /v1.51/events endpoint through Lazydocker's temporary SSH tunnel socket.

Desktop (please complete the following information):

  • OS: macOS Sequoia
  • Lazydocker Version: v0.25.2
  • Installed via Homebrew
  • Not built from source

Docker Client:

Version: 29.6.0
API version: 1.55

Remote Docker Server:

Version: 27.5.1
API version: 1.47

Additional context

The issue appears specific to Lazydocker. The following all work correctly using the same Docker context:

docker ps
docker events
docker logs
docker version

The Docker context configuration is:

Host: ssh://AORUS

where AORUS is an SSH host alias defined in ~/.ssh/config.

I also tested connectivity directly and verified that Docker's SSH transport is functioning correctly.

The most interesting detail is that the error references:

/v1.51/events

while the remote Docker daemon reports:

API version: 1.47

Docker CLI successfully negotiates and communicates with the remote daemon, but Lazydocker appears to lose the event stream connection with an EOF error.

Please let me know if there is a debug mode or additional logging I can provide.

Also note these errors happen on both MacOS and Ubuntu Server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions