I used to able to build and deploy the same exact ways a few days ago and now looks like prefect and docker has connection issue.
I also tested scripts on terminal to work with docker desktop and everything is fine and also gave permission to /var/run/docker.sock and added my user to docker group.
All agents also running fine.
_prefect deployment build flows/python/build_file.py:load_credit_sf -n prefect-docker-creditfurnishing -q docker -sb s3/prefect-s3/credit-furnishing/docker-local-image -ib docker-container/prefect-docker-creditfurnishing --apply_
_retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) The above exception was the direct cause of the following exception: RuntimeError: Could not connect to Docker.