CTFd-Docker-Challenges icon indicating copy to clipboard operation
CTFd-Docker-Challenges copied to clipboard

Cannot list repositories - Failed to connect to Docker

Open svink123 opened this issue 2 years ago • 3 comments

In the docker config menu, it is failing to connect to docker and load the repositories:

image

Even though the URL is accessible from the browser and the list is not empty:

image

I ran the service using: sudo dockerd --tls=false -H=tcp://127.0.0.1:2376

image

svink123 avatar Mar 29 '23 21:03 svink123

I'm having the same problem, though I enabled TLS on mine. Ever figure it out?

Zeldapedia avatar Apr 03 '23 21:04 Zeldapedia

Has anyone figured it out?

h114mx001 avatar Nov 21 '23 03:11 h114mx001

Hello there, I think that the Docker API has changed again. After doing something like #28, you should also change the 262 line in __init.py__:

for i in r.json():
       if not i['RepoTags'] == []: # Change this from None -> []
           if not i['RepoTags'][0].split(':')[0] == '<none>':
               if repos:
                   if not i['RepoTags'][0].split(':')[0] in repos:
                       continue
               if not tags:
                   result.append(i['RepoTags'][0].split(':')[0])
               else:
                   result.append(i['RepoTags'][0])

Hope it helps.

h114mx001 avatar Nov 21 '23 08:11 h114mx001