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

Issues with updated version 23.0, it no longer works #488

Open
PaPaTheGMan opened this issue Oct 11, 2023 · 13 comments · Fixed by #489
Open

Issues with updated version 23.0, it no longer works #488

PaPaTheGMan opened this issue Oct 11, 2023 · 13 comments · Fixed by #489
Labels
bug Something isn't working

Comments

@PaPaTheGMan
Copy link

Describe the bug
Updated to version 23.0 and now lazydocker won't run. Receive the following error messages upon attempting to run:
2023/10/11 07:58:15 > could not determine host stat /root/.docker: no such file or directory
2023/10/11 07:58:15 unable to parse docker host ``

To Reproduce
Steps to reproduce the behavior:

  1. Run the Install script - curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
  2. Enter lazydocker from the command line
  3. See error

Expected behaviour
Expected lazydocker to run normally. Have updated many times in the past with no issues.

Screenshots
pi@RaspberryPi4B:~ $ curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 884 100 884 0 0 5490 0 --:--:-- --:--:-- --:--:-- 5525
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4014k 100 4014k 0 0 5560k 0 --:--:-- --:--:-- --:--:-- 5560k
lazydocker
pi@RaspberryPi4B:~ $ lazydocker
2023/10/11 08:16:10 > could not determine host stat /home/pi/.docker: no such file or directory
2023/10/11 08:16:10 unable to parse docker host ``
pi@RaspberryPi4B:~ $

Desktop (please complete the following information):

  • OS: various - all have the same issue:
    • Ubuntu 22.04.3 LTS x86_64
    • Armbian (23.8.1) aarch64
    • Debian GNU/Linux 11 (bullseye) aarch64
    • Ubuntu 22.04.3 LTS aarch64
    • Ubuntu 22.04.3 LTS armv7l
    • Debian GNU/Linux 12 (bookworm) aarch64
    • Arch Linux x86_64
    • Ubuntu 20.04.6 LTS x86_64
  • Lazydocker Version [23.0]

Additional context
Add any other context about the problem here.

@PaPaTheGMan PaPaTheGMan added the bug Something isn't working label Oct 11, 2023
@luckman212
Copy link

I had this too. Creating the ~/.docker directory seems to fix it.

mkdir ~/.docker

@mark2185
Copy link
Contributor

Bisect points to this.

@nestor-custodio
Copy link

nestor-custodio commented Oct 11, 2023

Seems odd that we're determining the Docker host by duplicating what Docker does to determine the current host. Shouldn't the entire determineDockerHost function be replaced by a straight-forward call to docker context inspect "$( docker context show )" so we can pull the [0].Endpoints.docker.Host value? This works regardless of the presence of "${HOME}/.docker" (which we shouldn't be reading directly, IMO).

@PaPaTheGMan
Copy link
Author

PaPaTheGMan commented Oct 11, 2023 via email

@nestor-custodio
Copy link

@PaPaTheGMan It looks like you're running lazydocker as sudo, so in your case a sudo mkdir /root/.docker would be the "fix".

@PaPaTheGMan
Copy link
Author

PaPaTheGMan commented Oct 11, 2023 via email

@jesseduffield
Copy link
Owner

Interesting: docker for mac (which I'm using) will create that directory if it doesn't already exist when it starts.

I'm removing the directory existence check as it's not necessary given docker's own code will itself gracefully check for it. See #489

Works for me locally, would anybody else be able to test on their end?

@jesseduffield
Copy link
Owner

That's on the master branch now

@devhero
Copy link

devhero commented Oct 13, 2023

Same issue here, version 0.23.1, but happend after first machine reboot.
~/.docker folder already there, moved into ~/.docker__ and created a new ~/.docker one.
Now it works.

@ownicn
Copy link

ownicn commented Oct 24, 2023

see #493

@devregnfo
Copy link

Leaving the line at ~/docker/config.json :
{
"currentContext": "",
}
... seems to work for me. But I got rid of Docker-Desktop and use only docker.io from DEBIAN (MX-Linux + SysVinit)
I got rid of the problem.

@jpetazzo
Copy link

jpetazzo commented Apr 9, 2024

I'm running into the same issue.

I installed lazydocker with go install github.com/jesseduffield/[email protected].

Then, it failed with the following error mesage:

$ lazydocker --debug
2024/04/09 15:57:09 > could not determine host context "default" does not exist
2024/04/09 15:57:09 unable to parse docker host ``

I inspected my ~/.docker/config.json file, and saw the following line:

$ grep currentContext ~/.docker/config.json
	"currentContext": "default"

I replaced that line with "currentContext": "" and now it works! 🎉

@c0d3sling3r
Copy link

I'm running into the same issue.

I installed lazydocker with go install github.com/jesseduffield/[email protected].

Then, it failed with the following error mesage:

$ lazydocker --debug
2024/04/09 15:57:09 > could not determine host context "default" does not exist
2024/04/09 15:57:09 unable to parse docker host ``

I inspected my ~/.docker/config.json file, and saw the following line:

$ grep currentContext ~/.docker/config.json
	"currentContext": "default"

I replaced that line with "currentContext": "" and now it works! 🎉

I just installed lazydocker on my Arch and immediately faced the issue, even though I had ~/.docker directory. And this solution worked for me. Thanks.

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

Successfully merging a pull request may close this issue.

10 participants