After update Docker Desktop to latest version(4.20.1) the L3d is out of order. Even executing the 'composer install' it is giving an error 'Cannot connect to the Docker daemon at unix:///Users/.../.docker/run/docker.sock. Is the docker daemon running?', while if we execute command 'docker version' it's giving the output.
We were expecting it as an error due to upgrade, so we decided to downgrade it. We installed a older version '4.17.0'. But still we are not able to resolve the issue. Still it's giving same error 'Cannot connect to the Docker daemon at unix:///Users/SLal/.docker/run/docker.sock. Is the docker daemon running?'
Please check attached screenshot.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Does the file /Users/SLal/.docker/run/docker.sock really exist on your host - not inside the container? It could well be that Docker decided to store that socket file now somewhere else. In such cases, l3d reset may remove existing containers and rebuilds them next time you use them. Or it may be changed permissions on that file on the host.
All in all, you're the only ones using Macs, so we rely on you to find out what's changed. We can't help otherwise.
maybe just to add here some information... I and Shyam did some debugging on his MacOS
interesting.. docker ps worked from the l3drun container so it can see containers from the host machine, but it didn't work from project_l3d container (php-8.1:v2.92 image) because that error:
'Cannot connect to the Docker daemon at unix:///Users/.../.docker/run/docker.sock. Is the docker daemon running?'
We executed docker version from both containers, so we can compare it.. and noticed that Context is set to default in the l3drun container (Client), but in project_l3d Context was desktop-linux or so
so then we simply removed the content of the ~/.docker/config.json (host machine) file (Context = desktop-Linux was configured there). After this change docker ps worked in both containers, so it can see containers from the host machine. But it works only if we bash directly into the container (docker exec -it container_name bash)
if we use the l3d command to bash into the project_l3d container, it still doesn't work
'Cannot connect to the Docker daemon at unix:///Users/.../.docker/run/docker.sock. Is the docker daemon running?'
So at least the workaround works for now - bash directly into the container instead of using the l3d command...
Also, we noticed this when we did docker inspect on a project_l3d container... { "Config": "User": "" } (empty), not sure if this is related to the problem...
Have you tried l3d reset and made sure that all l3d related containers are deleted, not only stopped? After that, l3d should create the containers following the possibly changed environment on the host and I expect all to be OK again.
@jurgenhaas Yes, actually l3d reset was the first thing I tried afterward. But it still didn't work when using the l3d command. Additionally, I have tried to create a fresh new project, having in mind that complete new containers will be created in this case. But the result was still the same... when using l3d - docker ps didn't work. But when manually bash into the container - it worked
Sadly, I don't have MacOS to play more with that. And Shyam is now on vacation. So probably we can investigate it more when he is back
I talked to @slsawhney yesterday on Slack, and he suggested a different approach to using l3d commands. Basically, you need to run l3d and create the container, exit from it, ssh into the container and run l3d commands from there.
This still needs debugging. Somebody with that environment needs to inspect the containers and that way it should be possible to find out, why this isn't working.
ssh into the container and run l3d commands from there
I wouldn't recommend that. SSH is not part of the game here.
Also, we noticed this when we did docker inspect on a project_l3d container... { "Config": "User": "" } (empty), not sure if this is related to the problem...
That sounds like an important issue. Let's find out why the user is empty. Because if there isn't a user, it could be just a permission issue.
But first of all, you should find out if the mounting from the hosts docker socket is properly mounted into the container and is the environment variables inside the conmtainer point to the correct socket then.
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATORdefault moby Current DOCKER_HOST based configuration unix:///var/run/docker.sockdesktop-linux * moby Docker Desktop unix:///Users/tolgaozses/.docker/run/docker.sock```.Does this look like your config @jurgenhaas and @danielspeicher?
I have a ~/.docker/config.json file that contains just a couple of auth entries. But that's not relevant for what we're discussing here. Whether the credStore or currentContext are relevant, I can't tell. They are probably from Docker Desktop on Mac. On Linux, there is no Docker Desktop, there is just the docker engine.
My context looks like this:
docker context lsNAME DESCRIPTION DOCKER ENDPOINT ERRORdefault * Current DOCKER_HOST based configuration unix:///var/run/docker.sock
However, I would still first go for the debugging of the docker socket mount point and the user permissions as described in my previous comment.
I found a solution to my problem, albeit not a real solution. I installed UTN on MacBook Pro M2 and installed Ubuntu Desktop 64bit in it. The trick is to install it by clicking the Emulator button.