Mitch
08/21/2023, 6:04 PMFile "/usr/local/lib/python3.10/site-packages/prefect_docker/worker.py", line 485, in _get_client
raise RuntimeError("Could not connect to Docker.") from exc
Jake Kaplan
08/21/2023, 6:08 PMdocker
isn't running on your system likely? (no docker daemon)Jake Kaplan
08/21/2023, 6:08 PMJake Kaplan
08/21/2023, 6:09 PMimport docker
docker_client = docker.from_env()
Mitch
08/21/2023, 6:19 PMTraceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 415, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.10/http/client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/local/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/usr/local/lib/python3.10/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Mitch
08/21/2023, 6:20 PMsystemctl status docker.service
Yields the followingMitch
08/21/2023, 6:51 PMNate
08/22/2023, 1:58 AMsudo usermod -aG docker prefect-worker-user
# log out / log in
sudo systemctl restart docker
Mitch
08/22/2023, 2:12 AM