Fix docker daemon connection on mac
ahmetlekesiz opened this issue · comments
Ahmet Lekesiz commented
Problem:
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Fix:
- add docker-proxy to services
docker-proxy:
image: bobrik/socat
command: "TCP4-LISTEN:2375,fork,reuseaddr UNIX-CONNECT:/var/run/docker.sock"
ports:
- "2376:2375"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- change
docker_url='unix://var/run/docker.sock'
in the DockerOperator inside the DAG, intodocker_url='tcp://docker-proxy:2375'
Thats all.
Detailed explanation: https://onedevblog.com/how-to-fix-a-permission-denied-when-using-dockeroperator-in-airflow/