Azure / iotedgedev

The Azure IoT Edge Dev Tool greatly simplifies your Azure IoT Edge development process. It has everything you need to get started and helps with your day-to-day Edge development.
https://aka.ms/iotedgedev
Other
160 stars 69 forks source link

[BUG] Can't connect to docker via iotedgedev on Apple Silicon #617

Closed kitsunekyo closed 5 months ago

kitsunekyo commented 5 months ago

Description

When I run docker run hello-world I get the expected output, so docker does work.

When I try to run iotedgedev build in the same terminal, I get the following error:

ERROR: ('Could not connect to Docker daemon. Please make sure Docker daemon is running and accessible', DockerException("Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))"))

Expected behavior

iotedgedev to be able to interact with docker

Actual behavior

ERROR: ('Could not connect to Docker daemon. Please make sure Docker daemon is running and accessible', DockerException("Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))"))

Steps to Reproduce

  1. be on apple silicon m1 macbook
  2. install docker desktop
  3. install iotedgedev according to wiki
  4. run iotedgedev init to scaffold
  5. run iotedgedev build

Environment

Apple Silicon MacOS Sonoma 14.2.1 iotedgedev, version 2.1.0 Docker version 25.0.2, build 29cf629 Python 3.11.7 pip 24.0 from /opt/homebrew/lib/python3.11/site-packages/pip (python 3.11)

kitsunekyo commented 5 months ago

solved by configuring Docker Desktop Settings > Advanced > Allow the default Docker socket to be used (requires password).

maybe this helps someone.