magentic-ui: magentic-ui fails to find running docker

$ colima start
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] starting ...                                  context=vm
INFO[0012] provisioning ...                              context=docker
INFO[0013] starting ...                                  context=docker
INFO[0014] done

$ docker context ls
NAME       DESCRIPTION                               DOCKER ENDPOINT                                  ERROR
colima *   colima                                    unix:///Users/samm/.colima/default/docker.sock

$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

$ magentic ui --port 8081
Starting Magentic-UI
Checking if Docker is running...Failed

Docker is not running. Please start Docker and try again.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (4 by maintainers)

Most upvoted comments

My computer is a Mac M1, with Docker Version: 28.1.1.
I encountered the following problem:
Starting Magentic-UI
Checking if Docker is running…Failed
Docker is not running. Please start Docker and try again.

After several hours of troubleshooting, it seems that the issue is caused by the Docker service communication socket path.

On my Mac, the Docker service communication socket path is: Users/XXXX/.docker/run/docker.sock

A quick fix is to modify the code from:

client = docker.from_env()

to:

client = docker.DockerClient(base_url='unix://Users/XXXX/.docker/run/docker.sock')

me too i use docker desktop in ubuntu

Image

Thank you @automationliu

Can confirm that setting environmental variable also works (tested Apple M1 Pro | Mac OS 15.5)

export DOCKER_HOST=unix://Users/XXXX/.docker/run/docker.sock

Thank you @automationliu !!

Can confirm that setting environmental variable also works (tested Pop!OS 22.04)

export DOCKER_HOST=unix:///home/<your-username>/.docker/desktop/docker.sock

had same problem on mac(m2), but after deleting docker desktop and installing docker and colima with brew it’s working

# For Colima Docker
export DOCKER_HOST="unix:///Users/$(whoami)/.colima/default/docker.sock"

My user does have access and other containers and apps that use them work fine.