python3-docker `from_env()` broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-docker (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I have a python script that manages some docker resources. It uses the `from_env()` method to build the client. This script always runs as root.
This worked in Ubuntu 22.04. However, it seems like something is mismatched in 24.04, as I now get the following error, even after a reboot (which seemed to solve this for others in the past?). It appears based on cursory googling that a library version might be out of sync.
```
Traceback (most recent call last):
File "/usr/bin/
ContainerUt
File "/usr/lib/
client = docker.from_env()
File "/usr/lib/
return cls(
^^^^
File "/usr/lib/
self.api = APIClient(*args, **kwargs)
File "/usr/lib/
self._version = self._retrieve_
File "/usr/lib/
raise DockerException(
docker.
```
This is on a fresh 24.04 install.
Willing to help diagnose, but to replicate:
1. `apt install docker.io python3-docker`
2. `python3`
3. `import docker`
4. `docker.from_env()`
Status changed to 'Confirmed' because the bug affects multiple users.