osrf / rocker

A tool to run docker containers with overlays and convenient options for things like GUIs etc.
Apache License 2.0
584 stars 75 forks source link

rocker fails with recent docker #278

Closed AndreasAZiegler closed 4 months ago

AndreasAZiegler commented 6 months ago

I'm running Docker version 26.1.3, build b72abbb6f0 on Arch Linux. After a recent update of docker (I assume), rocker does not work anymore. I get the following when I want to start

usage: rocker [-h] [--noexecute] [--nocache] [--nocleanup] [--pull] [--version] [--cuda] [--dev-helpers] [--devices [DEVICES ...]] [--env NAME[=VALUE] [NAME[=VALUE] ...]]
              [--env-file ENV_FILE] [--expose EXPOSE] [--git] [--git-config-path GIT_CONFIG_PATH] [--group-add GROUP_ADD] [--home] [--name NAME]
              image [command ...]
rocker: error: DependencyMissing encountered: Docker Client failed to connect to docker daemon. Please verify that docker is installed and running. As well as that you have permission to access the docker daemon. This is usually by being a member of the docker group. The underlying error was:
"""
Error while fetching server API version: Not supported URL scheme http+docker
"""

Running the same Docker image with docker works, therefore I assume it's a rocker bug.

tfoote commented 5 months ago

The code at issue is where we check that docker-py client initializes correctly. https://github.com/osrf/rocker/blob/4b074a9e90a43d80c80bdc76514b3b8e87bee08e/src/rocker/core.py#L208-L224

Can you check your version of docker-py and see if it's able to operate correctly? What version are you using? It may be that it's fallen behind the docker version on Arch.

Digging a little bit deeper It looks like there's an upstream issue related to this: https://github.com/docker/docker-py/issues/3256 it looks like it's actually about the version of the requests library that was upgraded. With some root cause analysis here: https://github.com/psf/requests/issues/6707

I think that if you make sure docker-py has the fix they have merged it should start working again.

tfoote commented 4 months ago

I've tested on a system with requests 2.32.3 and it's working. I think that upstream has resolved this so closing.