-
Notifications
You must be signed in to change notification settings - Fork 231
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
supabase start
Error: Failed to connect to Docker daemon. Is Docker running?
#167
Comments
If it starts fine when running as a super user, you almost certainly have the Docker daemon running. Two things you can consider
|
Hey @t-eckert, thanks for the suggestion. I have already added my user with root privileges to the Docker group, as you can see I can run docker commands but not supabase commands. Seems to be an issue with my setup, as it runs fine in the ci |
@nvme0 if you're using Mac (I believe this applies to Windows as well), you need to have Docker Desktop running.
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. |
@osaxma Thanks for the suggestion, I am running on Linux |
What are the permissions for your This is probably related to the rootless mode mentioned above. |
I'm hitting this error trying to run the CLI in a Vercel build step. This is the "Install Command" I'm running:
That command runs fine, but when I try to commit the database migrations:
I get Docker daemon error message:
I can replicate this on my local (macOS) machine using the same build image Vercel uses:
Unhelpfully, the AWS documentation mentions you might need to reboot an EC2 instance to fix Docker permission issues after installing: Is there something really obvious I've missed here or any thoughts on how to work around this? I'm trying to keep the whole setup as simple as possible, but it's looking like I might need to get some other infrastructure involved to run the migrations (maybe GitHub Actions?). |
@haydn not familiar with Vercel, but are you able to run Docker containers in a Vercel build step? Same thing for the local repro. |
Just tested the local repro myself, I worked when I did: docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock amazonlinux:2.0.20191217.0 sh |
@soedirgo Thanks for the quick reply!
Nope, Vercel runs the Docker containers. All that is configurable are some commands to run within them: |
Can you check if you can run e.g. |
Sorry, I probably should've included that in my first comment. Just running
|
I have the same issue. System informationOS: Mac 12.6 |
This was using latest Docker Desktop. After reading the release notes I noticed this on 4.13.0:
It worked for me after downgrading. |
I just went ahead and created the symbolic link and it worked for me. I'm upgrading to a new machine next week anyway, so this one will be wiped. :)
I had to sudo it. |
You can also use the DOCKER_HOST=unix:///Users/me/.docker/run/docker.sock supabase start |
Closing this as won't fix because docker is a prerequisite for using the CLI. |
This is a future reference to myself. On Linux, I did something like this (I use Docker Desktop):
|
There's no mention in the doc that docker is prerequisite; can you add it there as I lost hours trying to generate types and the doc just mention to run the command. I thought my connection is bad |
@techandmedia could you post your error logs here? Generating types for a hosted project does not require docker https://supabase.com/docs/guides/api/generating-types. The original issue is related to local development which we have documented that docker is a prerequisite. |
@sweatybridge $ npx supabase login
$ npx supabase gen types typescript --db-url postgresql://postgres:[email protected]:5432/ppostgres
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Connecting to postgresql://postgres:[email protected]:5432/postgres
Error: error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdockker_engine/v1.24/images/public.ecr.aws/supabase/postgres-meta:v0.58.0/json": open //./pipe/docker_engine: The system cannot fnind the file specified.
Try rerunning the command with --debug to troubleshoot the error.
error Command failed with exit code 1. |
The npx supabase login
npx supabase gen types typescript --project-id myconnection --schema public > types/supabase.ts I will update the cli reference docs to make this distinction clearer. |
Hi @sweatybridge thank you for your reply, but I still got error, though it's different $ npx supabase gen types typescript --project-id connection --schema public > types/supabase.ts
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Error: failed to retrieve generated types: {"message":"Forbidden resource"}
Try rerunning the command with --debug to troubleshoot the error.
error Command failed with exit code 1. |
Have you replaced |
Hi @sweatybridge npx supabase gen types typescript --project-id postgresql://postgres:[email protected]:5432/postgres --schema public > types/supabase.ts
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Error: failed to retrieve generated types: {"message":"Forbidden resource"}
Try rerunning the command with --debug to troubleshoot the error.
error Command failed with exit code 1. Where can I see this in the dashboard? Also if you are free, can you have a look of this discussion raised by me as well? Thanks |
Your project id is part of the url you use to access supabase.com: https://app.supabase.com/project/ Alternatively use |
Ah ok got, it works now, thanks @sweatybridge |
Took me longer than I care to admit to realize I needed 3 |
if you are using colima do this instead
or of course add it to your |
@sweatybridge is Docker a prerequisite for following the Managing Environments guide? Because I'm also getting this issue and I don't see Docker mentioned on that page. That page is linked to in a few places and skips the Local Development guide so it's understandable that Docker might not be installed if you've previously only been using the supabase.com dashboard. Going to install it and hope it fixes it though. Update: installed Docker and it's working fine now, could be good to add to that guide. |
Hi @mlynch, thanks for spotting this inconsistency in our guides. Yes, docker is indeed a prerequisite for managing environments. I've opened a PR to update the docs. |
On MacOS, this fixes the situation for me: |
Curious, why is this issue resolved? Isn't this a bug with supabase? At the very least, I'd assume that supabase should update the docs on local development to save everyone from having to search for a fix on this thread. |
We closed this issue because it is specific to user's docker installation. Since Docker Desktop 4.14.0, the socket file Hence, I don't consider this a bug specific to the CLI. But I will go ahead and document the |
|
Thanks! I encountered this problem after installing Docker Desktop for macOS version 4.20.0 and I did not do anything special during the installation or deny it any requested access. |
Thank you! This worked for me! |
Bug report
Describe the bug
Recently updated to supabase 0.17.0, and when running
supabase start
I get the following error message:Error: Failed to connect to Docker daemon. Is Docker running?
Using the npm package (0.5.0) I have no issues running
supabase start
.edit: It starts fine when running as a super user
System information
The text was updated successfully, but these errors were encountered: