Skip to content

Doesn't seem to work with registry #38

Description

@tpitman

I am trying to use a local docker registry to hold my challenges.

I added this to my docker-compose.yml that you provided:

  registry:
      image: registry:2
      ports:
        - "12982:5000" # Maps host port 12982 to container port 5000

I then built and pushed a challenge from StormCTF to this repository and that works great.

I then ensured that my host's docker is available and CTFd can contact it. I went through quite a day getting that all working, but it seems to work.

Now I am getting this set of errors when I try to hit submit on the docker_challenges admin site:

nginx-1     | 172.18.0.3 - - [29/Oct/2025:21:48:44 +0000] "GET /images/json?all=1 HTTP/1.1" 404 2590 "-" "python-requests/2.32.4"
ctfd-1      | 172.18.0.3 - - [29/Oct/2025:21:48:44 +0000] "GET /images/json?all=1 HTTP/1.0" 404 10190 "-" "python-requests/2.32.4"
ctfd-1      | Traceback (most recent call last):
ctfd-1      |   File "/opt/venv/lib/python3.11/site-packages/requests/models.py", line 976, in json
ctfd-1      |     return complexjson.loads(self.text, **kwargs)
ctfd-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ctfd-1      |   File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
ctfd-1      |     return _default_decoder.decode(s)
ctfd-1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
ctfd-1      |   File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
ctfd-1      |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
ctfd-1      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ctfd-1      |   File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
ctfd-1      |     raise JSONDecodeError("Expecting value", s, err.value) from None
ctfd-1      | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ctfd-1      | 
ctfd-1      | During handling of the above exception, another exception occurred:
ctfd-1      | 
ctfd-1      | Traceback (most recent call last):
ctfd-1      |   File "/opt/CTFd/CTFd/plugins/docker_challenges/__init__.py", line 145, in docker_config
ctfd-1      |     repos = get_repositories(docker)
ctfd-1      |             ^^^^^^^^^^^^^^^^^^^^^^^^
ctfd-1      |   File "/opt/CTFd/CTFd/plugins/docker_challenges/__init__.py", line 268, in get_repositories
ctfd-1      |     for i in r.json():
ctfd-1      |              ^^^^^^^^
ctfd-1      |   File "/opt/venv/lib/python3.11/site-packages/requests/models.py", line 980, in json
ctfd-1      |     raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
ctfd-1      | requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ctfd-1      | 192.168.65.1 - - [29/Oct/2025:21:48:44 +0000] "GET /admin/docker_config HTTP/1.1" 200 7791 "http://localhost:8000/admin/config?" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
c

Gemini seems to think this is an issue with the compatibility between the repository and your plugin, but we all know AI can give false responses.

I don't know enough myself, so I am asking here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions