Support Docker as root on Linux
When using bridge configuration in a local environment on Linux with a standard Docker setup, all Docker calls will fail.
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Simply using sudo will often fail since it will not inherit things like a Python virtual environment.
At a minimum bridge should show an informative error message suggesting something like:
sudo -E env PATH=$PATH .venv/bin/python manage.py [command]
which can probably also show the output of which python or just the full path to the currently executing command.
Under advanced docker settings check the case “Allow the default Docker socket to be used (requires password)”.
In case anyone else hits this, I added my user to the docker group as described here and this resolved the issue.
https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user