lazydocker icon indicating copy to clipboard operation
lazydocker copied to clipboard

Issues with updated version 23.0, it no longer works

Open PaPaTheGMan opened this issue 2 years ago • 13 comments

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 avatar Oct 11 '23 12:10 PaPaTheGMan

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

mkdir ~/.docker

luckman212 avatar Oct 11 '23 12:10 luckman212

Bisect points to this.

mark2185 avatar Oct 11 '23 12:10 mark2185

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).

nestor-custodio avatar Oct 11 '23 15:10 nestor-custodio

Sorry, that did not work in my cases.

From: Luke Hamburg @.> Sent: Wednesday, October 11, 2023 8:38 AM To: jesseduffield/lazydocker @.> Cc: PaPaTheGMan @.>; Author @.> Subject: Re: [jesseduffield/lazydocker] Issues with updated version 23.0, it no longer works (Issue #488)

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

mkdir ~/.docker

Reply to this email directly, view it on GitHubhttps://github.com/jesseduffield/lazydocker/issues/488#issuecomment-1757595112, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANTUBLA6DBLI7PG5P3IPNP3X62HJPANCNFSM6AAAAAA534WIY4. You are receiving this because you authored the thread.Message ID: @.@.>>

PaPaTheGMan avatar Oct 11 '23 18:10 PaPaTheGMan

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

nestor-custodio avatar Oct 11 '23 18:10 nestor-custodio

Ah ha, you are right. That did the trick. Why the change? I didn't need that empty folder before?

From: Nestor Custodio @.> Sent: Wednesday, October 11, 2023 2:31 PM To: jesseduffield/lazydocker @.> Cc: PaPaTheGMan @.>; Mention @.> Subject: Re: [jesseduffield/lazydocker] Issues with updated version 23.0, it no longer works (Issue #488)

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

Reply to this email directly, view it on GitHubhttps://github.com/jesseduffield/lazydocker/issues/488#issuecomment-1758269565, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANTUBLDESOOEB7UYQP3IOT3X63QWJANCNFSM6AAAAAA534WIY4. You are receiving this because you were mentioned.Message ID: @.@.>>

PaPaTheGMan avatar Oct 11 '23 18:10 PaPaTheGMan

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 https://github.com/jesseduffield/lazydocker/pull/489

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

jesseduffield avatar Oct 12 '23 06:10 jesseduffield

That's on the master branch now

jesseduffield avatar Oct 12 '23 06:10 jesseduffield

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.

devhero avatar Oct 13 '23 13:10 devhero

see #493

ownicn avatar Oct 24 '23 09:10 ownicn

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.

devregnfo avatar Oct 30 '23 21:10 devregnfo

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! 🎉

jpetazzo avatar Apr 09 '24 14:04 jpetazzo

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.

c0d3sling3r avatar Apr 10 '24 10:04 c0d3sling3r