-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bug: Error: Docker is not reachable (even though it is!) #4329
Comments
Same problem here Device: Macbook Pro (Intel) |
Same problem Device: Macbook Pro (Apple M1 Pro) There is a docker client object at "/opt/homebrew/Cellar/aws-sam-cli/1.60.0/libexec/lib/python3.8/site-packages/samcli/local/docker/utils.py", but |
Same problem here. Device: Macbook Pro (m1) |
Thanks for reporting this issue. Can you confirm if same behavior happens with |
both haven't worked for me |
@mndeveci when I run
and when running
or when running the
|
No. I tried a lot of stuff but nothing seems to do it for me. |
We've tried to reproduce issue on both x86 (Intel) and arm (M1) machines. Bot of them worked with earlier docker version, (M1: 20.10.14, Intel: 20.10.17). Upgrading to latest version (20.10.20) broke the M1 instance, but it was still working with Intel. We will be working on resolution, for a workaround, I would recommend downgrading docker version for now. Edit: Apologies for earlier version of this comment, but it looks like both M1 and Intel machines are working fine. In previous attempt, docker daemon was not running during the test with M1 machine. After running docker daemon, it worked fine with it as well. Can you provide how did you install AWS SAM CLI? Did you use homebrew ( |
I get the same error when I use
or if I use
output:
and the output of
|
I could make it work by downgrading to |
@mndeveci yes the issue also happens with |
@mndeveci Like @ddhanak, I could also make everything work when I downgraded to https://docs.docker.com/desktop/release-notes/#docker-desktop-470 which uses Docker version 20.10.14, build a224086. I think you're right that upgrading to latest version of docker (20.10.20) breaks on the M1 instance. (which I run it through https://docs.docker.com/desktop/release-notes/#docker-desktop-4130) |
same issue here. MacOS Monterey: 12.6
running correctly
|
same issue here. MacOS Monterey: 12.6 |
Yap, this is definitely an issue - running into the same problem with Docker version 20.10.20 on a M1 Macbook Pro |
Installing Docker version 20.10.14, build a224086 and upgrading manually fixes my issues but it's still quite weird that we cannot directly install the latest docker version. |
We were able to find the root cause of the issue. I think Docker has changed its behavior with its latest release in terms of setting up the default context for its client. If you run
And if you run
Unfortunately, docker library can't find out which context is been used without connecting to the docker daemon. So in order to fix the issue you need to provide
After running this way, SAM CLI commands will be succeeding. Same issue is reported in docker-py repository where we are discussing with them to resolve this issue. (See: docker/docker-py#3059) |
I had the same issues using an Apple M1 Pro chipset and I was able to get it working by downgrading my version of Docker Desktop to v4.7.0, which I did via this link . I just downloaded that version, ensured Docker Desktop wasn't running on my Macbook and replacing the app in my applications and then restarting Docker Desktop. |
An update from docker; docker/for-mac#6529 (comment) They will rollback this change and plan to release it later. |
I am facing this issue on a daily basis. Have to run SAM CLI version 1.75.0, Docker desktop engine 20.10.22, Apple M1 Pro |
Docker version 20.10.23, build 7155243 Same issue. |
same issue. SAM CLI, version 1.78.0 |
Same issue here: SAM CLI, version 1.78.0 Downgrading to 20.10.14 is working. But this version is quite outdated. |
Same issue here: SAM CLI, version 1.78.0 Downgrading to 4.7.0 is working. But this version is quite outdated. |
Same problem |
Same problem |
Same problem |
Same problem work around: sudo ln -sf "$HOME/.docker/run/docker.sock" /var/run/docker.sock |
Same issue SAM CLI, version 1.82.0 @nahue 's workaround worked for me |
@nahue's workaround does the trick for now.
I am on M1 Mac. |
Same issue. @nahue's workaround did not work for me.
|
Same issue. @nahue's work around sorted it for me.
|
In the docker settings go to Advanced -> Allow the default Docker socket to be used (requires password) and restart docker or Mac. It works for me |
@romakov success! |
Still facing this issue. @nahue 's workaround did NOT work for me. I am not using Docker Desktop but Colima instead. Had this issue even when I was using Docker Desktop. Moved to Colima as a workaround for this. Docker Version: Colima Version: colima version 0.5.5
git commit: 6251dc2c2c5d8197c356f0e402ad028945f0e830
runtime: docker
arch: x86_64
client: v24.0.5
server: v23.0.6 Colima Path: SAM Version: OS Details: Logs on running
|
Docker Desktop 4.21.1 (114176) is currently the newest version available. |
@ghoshpushpendu It worked for me, my issue was with catalina, but in your case if you modify the path to get Docker Desktop's context (probably |
Thanks a lot. This helped |
This worked for me. My SAM CLI stoped working after a Docker upgrade and I was stumped for hours until I found this solution. |
Thank you !. This is the fix for for Docker version 24.0.6, build ed223bc on Mac M1 |
Thanks! This solution was effective for me as well 🚀 |
Worked for me as well!! No need to restart the mac. Thanks! |
Same issue for me
Is there anythign I can do, please help, I've been at this for 3 hours |
It happened for me all of a sudden, and I already had that setting on. The fix for me was simply to restart Docker. |
@nahue's workaround still works 👍 - wish I'd found this page sooner. I lost a lot of time today trying resolve this 🤯 sam --version |
For those using Docker Desktop. At least in my case, I had to tweak @willianfalbo's solution.
Had to change sam --version |
Description:
Hi, I'm new to AWS SAM and I'm facing issue trying to run
sam local start-api
.I've docker perfectly installed and running. I can also run
docker run -d -p 80:80 docker/getting-started
I've followed each and every line of the documentation and am still getting this issue.
I would really appreciate if you can help and let me know if it's a bug or there is something I'm doing wrong.
Thanks!
Observed result:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Device: Macbook air M1 model
ProductName: macOS
ProductVersion: 12.6
BuildVersion: 21G115
SAM CLI, version 1.60.0
The text was updated successfully, but these errors were encountered: