Comments (12)
The ~/.docker
folder already exists in my directory, and this issue still exists.
I resolved this issue by removing the currentContext
attribute from the ~/.docker/config.json
file
# set the property value to an empty string
"currentContext": ""
# or remove entire attribute
- "currentContext": "default"
from lazydocker.
As a temporary workaround, I was able to get it to work by specifying the DOCKER_HOST environment variable as DOCKER_HOST="unix:///var/run/docker.sock" lazydocker
. (Ubuntu 22.04)
from lazydocker.
Same issue. Resolved by editing docker config, but that should not be the solution
from lazydocker.
Duplicate of #488.
from lazydocker.
The
~/.docker
folder already exists in my directory, and this issue still exists. I resolved this issue by removing thecurrentContext
attribute from the~/.docker/config.json
file# set the property value to an empty string "currentContext": "" # or remove entire attribute - "currentContext": "default"
This solved the issue for me too! Although it never feels good to delete something without even knowing what it does 😅 .
from lazydocker.
I can remove the currentContext
and lazydocker starts working again, but I have to do that every time Docker Desktop restarts.
from lazydocker.
What if you set it to an empty string?
from lazydocker.
What if you set it to an empty string?
Also when I set it to an empty string.
Docker Desktop resets the currentContext
back to the default
value when it starts.
I seem to have two Docker contexts:
I don't know exactly what these do. I tried removing the desktop-linux
context, but that also gets recreated when Docker Deskop restarts.
This is on Windows 11, Docker Desktop 4.25.0 and lazydocker 0.23.1
from lazydocker.
I've encountered the same issue, and @xyabc120's method helps me for now. Is this the only way to go?
from lazydocker.
I have the same issue - with ~/.docker/config.json
having the line "currentContext": "default"
, lazydocker
will not start.
Setting currentContext
to the empty string works around the issue - but then docker-compose
won't start:
$ lazydocker --version
Version: 0.23.1
Date: 2023-10-13T07:40:28Z
BuildSource: binaryRelease
Commit: 1060e17731c80372335446eabe6a56ba4facd2b3
OS: linux
Arch: amd64
$ lsb_release --codename
Codename: jammy
$ docker-compose --version
docker-compose version 1.29.2, build unknown
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 80, in main
command_func = dispatch()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 159, in dispatch
options, handler, command_options = dispatcher.parse(sys.argv[1:])
File "/usr/lib/python3/dist-packages/compose/cli/docopt_command.py", line 28, in parse
command_help, options, command = DocoptDispatcher.get_command_and_options(
File "/usr/lib/python3/dist-packages/compose/cli/docopt_command.py", line 23, in get_command_and_options
opt = docopt_full_help(command_help, argv, **options)
File "/usr/lib/python3/dist-packages/compose/cli/docopt_command.py", line 9, in docopt_full_help
return docopt(docstring, *args, **kwargs)
File "/usr/lib/python3/dist-packages/docopt.py", line 575, in docopt
extras(help, version, argv, doc)
File "/usr/lib/python3/dist-packages/docopt.py", line 485, in extras
sys.exit()
SystemExit
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in <module>
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 129, in main
exit_with_metrics(command, log_msg=msg, status=status,
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 147, in exit_with_metrics
MetricsCommand(command, status=status).send_metrics()
File "/usr/lib/python3/dist-packages/compose/metrics/client.py", line 40, in __init__
self.context = context_type or ContextAPI.get_current_context().context_type or 'moby'
AttributeError: 'NoneType' object has no attribute 'context_type'
$ docker-compose -p mtproject ps
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in <module>
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command
project = project_from_options('.', options)
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options
return get_project(
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project
client = get_client(
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client
client = docker_client(
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 143, in docker_client
if not context.is_docker_host():
AttributeError: 'NoneType' object has no attribute 'is_docker_host'
Removing the currentContext
completely makes both lazydocker
and docker-compose
work.
Interestingly, with currentContext
set to the empty string, lazydocker
works but does not show all docker-compose containers, and for some docker-compose containers it shows the wrong name.
from lazydocker.
same issue for me :( removing currentContext mkaes lazydocker work but then it gets its added back when restarting docker desktop.. making it unusable
from lazydocker.
weirdly if i use "docker context use default" it disappears from the config file and lazydocker works... but still restarting docker adds it back. Something has got twisted here maybe on the docker side.
Also it might be worth noting switching to desktop-linux context also works
from lazydocker.
Related Issues (20)
- Changed DOCKERFILE with existing hub image
- After running lazydocker, docker completely breaks and it starts to require root permissions HOT 2
- Cannot install on Debian 5.10.197-1 via curl .sh HOT 2
- Custom Colors/Theme Config
- Possibility to configure different servers to manage the Dockers and have then split on "tabs" HOT 4
- Request: View only mode
- Enhance Image Section with Active Use Indicator HOT 2
- Connecting to remote docker host over ssh is broken
- XDG base directory specification is not described in the config docs HOT 1
- Config options for side panel visibility / size HOT 1
- Rounded Corners
- can't install following README instructions HOT 1
- Installing on arch linux using yay fails HOT 4
- Can I pass a flag to set the Project Name to something ?
- Cannot proceed until docker gives us more information about the container. Please retry in a few moments.
- Move the panel with number like lazygit HOT 1
- Container log colors HOT 1
- Selectable Logs/Stats/Env/Config/Top HOT 2
- Inquiry about Memory Usage in LazyDocker HOT 1
- Issue while connecting to remote docker socket HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazydocker.