Has anyone had any success doing an image build (l...
# ask-community
i
Has anyone had any success doing an image build (leading up to a deploy) on macOS Sonoma; M2 CPU; using colima? I'm seeing a few errors during the Docker image build step that point at Prefect not being aware of how to find the colima equivalents to what vanilla Docker provides. The errors are below. (1) lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect sock.connect(self.unix_socket) FileNotFoundError: [Errno 2] No such file or directory (2) lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect sock.connect(self.unix_socket) urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) (3) lib/python3.11/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) (4) lib/python3.11/site-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) (5) lib/python3.11/site-packages/prefect/deployments/steps/core.py", line 182, in run_steps raise StepExecutionError(f"Encountered error while running {fqn}") from exc prefect.deployments.steps.core.StepExecutionError: Encountered error while running prefect_docker.deployments.steps.build_docker_image
r
Did Colima create
/var/run/docker.sock
? If not you might need to create it as a symlink to
$HOME/.colima/default/docker.sock
. Setting the DOCKER_HOME environment variable to the full path of Colima's Docker socket might also work. Something like:
Copy code
export DOCKER_HOME=unix:///Users/your_username/.colima/default/docker.sock