Skip to content
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

Cannot connect to the Docker daemon at unix:///var/run/docker.sock on Mac M1 #1772

Closed
rami1207 opened this issue Apr 26, 2023 · 2 comments
Closed
Labels
kind/bug Something isn't working

Comments

@rami1207
Copy link

Bug report info

Cannot connect to the Docker daemon at unix:///var/run/docker.sock on Mac M1

Command used with act

act --container-architecture linux/amd64

Describe issue

I'm using act on my Mac M1 (Apple Silicon) system to run GitHub Actions locally, but I'm experiencing an issue where act cannot connect to the Docker daemon. I'm running Docker Desktop for Mac (version 20.10.24, build 297e128) on macOS Monterey (version 12.0.1).

I've tried the following troubleshooting steps:

  1. Restarted Docker Desktop.
  2. Checked that Docker is running using docker version.
  3. Reinstalled Docker Desktop.
  4. Tested Docker functionality using docker-compose up with a sample docker-compose.yml file (which worked without any issues).

However, when I run act --container-architecture linux/amd64, I get the following error:

ERRO[0000] failed to obtain container engine info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 
[EMR Deployment/deploy] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest 
[EMR Deployment/deploy]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform=linux/amd64 username= forcePull=true 
Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I need help resolving this issue so that I can run GitHub Actions locally using act on my Mac M1 system.

System information:

  • OS: macOS Monterey 12.0.1
  • Hardware: Apple M1
  • Docker Desktop version: 20.10.24, build 297e128
  • Act version: act version 0.2.44

Link to GitHub repository

No response

Workflow content

I think this is irrevalent because act it self not connecting to docker

Relevant log output

DEBU[0000] Loading environment from /Users/ramireddy/dev/vs-clean-emr/.env
DEBU[0000] Loading action inputs from /Users/ramireddy/dev/vs-clean-emr/.input
DEBU[0000] Loading secrets from /Users/ramireddy/dev/vs-clean-emr/.secrets
DEBU[0000] Evaluated matrix inclusions: map[]
DEBU[0000] Loading workflows from '/Users/ramireddy/dev/vs-clean-emr/.github/workflows'
DEBU[0000] Loading workflows recursively
DEBU[0000] Found workflow 'pr.yml' in '/Users/ramireddy/dev/vs-clean-emr/.github/workflows/pr.yml'
DEBU[0000] Reading workflow '/Users/ramireddy/dev/vs-clean-emr/.github/workflows/pr.yml'
DEBU[0000] Preparing plan with all jobs
DEBU[0000] Using the only detected workflow event: push
DEBU[0000] Planning jobs for event: push
DEBU[0000] Unable to load etag from /Users/ramireddy/.cache/act/.notices.etag: &{%!e(string=open) %!e(string=/Users/ramireddy/.cache/act/.notices.etag) %!e(syscall.Errno=2)}
DEBU[0000] Loading revision from git directory
DEBU[0000] Found revision: ef2108a86cb43d38fdb6c4280e5f7b2709d80aef
DEBU[0000] HEAD points to 'ef2108a86cb43d38fdb6c4280e5f7b2709d80aef'
DEBU[0000] using github ref: refs/heads/feature/pipeline
DEBU[0000] Found revision: ef2108a86cb43d38fdb6c4280e5f7b2709d80aef
DEBU[0000] Loading revision from git directory
DEBU[0000] Found revision: ef2108a86cb43d38fdb6c4280e5f7b2709d80aef
DEBU[0000] HEAD points to 'ef2108a86cb43d38fdb6c4280e5f7b2709d80aef'
DEBU[0000] using github ref: refs/heads/feature/pipeline
DEBU[0000] Found revision: ef2108a86cb43d38fdb6c4280e5f7b2709d80aef
DEBU[0000]
DEBU[0000] Final matrix after applying user inclusions '[map[python-version:3.11.3]]'
DEBU[0000] Loading revision from git directory
DEBU[0000] Found revision: ef2108a86cb43d38fdb6c4280e5f7b2709d80aef
DEBU[0000] HEAD points to 'ef2108a86cb43d38fdb6c4280e5f7b2709d80aef'
DEBU[0000] using github ref: refs/heads/feature/pipeline
DEBU[0000] Found revision: ef2108a86cb43d38fdb6c4280e5f7b2709d80aef
ERRO[0000] failed to obtain container engine info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[EMR Deployment/deploy] [DEBUG] evaluating expression 'success()'
[EMR Deployment/deploy] [DEBUG] expression 'success()' evaluated to 'true'
[EMR Deployment/deploy] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest
[EMR Deployment/deploy]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=true
[EMR Deployment/deploy] [DEBUG]   🐳  docker pull ghcr.io/catthehacker/ubuntu:act-latest
[EMR Deployment/deploy] [DEBUG] pulling image 'ghcr.io/catthehacker/ubuntu:act-latest' ()
Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Additional information

No response

@rami1207 rami1207 added the kind/bug Something isn't working label Apr 26, 2023
@catthehacker
Copy link
Member

duplicate of #1658

@catthehacker catthehacker closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2023
@rami1207
Copy link
Author

rami1207 commented May 3, 2023

Thank you, the sock thing worked fine
sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants