Cannot pull Plugin images with xnat-docker-compose + Container Service Plugin setup (MacOS)

236 views
Skip to first unread message

Tom Roberts

unread,
May 7, 2024, 10:53:08 AM5/7/24
to xnat_discussion
Hi there,

I'm fairly new to the XNAT world, so bear with me if I'm doing something stupid... I've searched through the conversations and I found this one which is possibly similar to my issue, but I can't quite tell: https://groups.google.com/g/xnat_discussion/c/yyPBkN4kayE/m/8Lv_ppCFAAAJ

Setup
MacOS, Sonoma 14.3.1
Docker Desktop v4.29.0
Docker Engine v26.0.0
xnat-docker-compose v1.8.9.2
Container Service Plugin v3.4.3

Issue
I am trying to setup an XNAT instance on my local machine (running MacOS) via xnat-docker-compose, including the Container Service Plugin, however XNAT fails when trying to pull my Docker image. I get the following error message:

Error 500: error

The Docker server returned an error: org.mandas.docker.client.exceptions.DockerRequestException: Request error: GET unix://localhost:80/images/tomaroberts/xnat-rt2nii:latest/json: 200


(For added context, I have developed a plugin for the Container Service which converts RTSTRUCT files to NIFTI within XNAT. I have confirmed the plugin pulls and works on a colleague's Linux-based XNAT instance. Will share my plugin with the community soon.)

Steps so far
1. Install xnat-docker-compose (I had to install version 1.8.9.2, because I had some issues with the very latest version on the repo)
2. Install Container Service Plugin (container-service-3.4.3-fat.jar in xnat/plugins/)
3. docker compose up -d
4. Access via localhost:80
5. Update Image Host details with my own Docker Hub credentials

Then, in accordance with the README on xnat-docker-compose, I've tried:
6. Setting Path Translation fields:
XNAT Path Prefix = /data/xnat
Server Path Prefix = /Users/tr17/code/xnat-docker-compose/xnat-data (basically where I cloned the repo to)
7. Setting Processing URL to http://host.docker.internal

Let me know if you need any more info from me. Happy to provide logs, etc if you can let me know the necessary commands.

Many thanks
Tom


John Flavin

unread,
May 7, 2024, 12:23:05 PM5/7/24
to xnat_di...@googlegroups.com
Yes, I think you are running into the same issue from that other thread. I’m working on a fix for it now.

In the meantime, if it is possible for you to downgrade docker, I think that should resolve the issue. 

John Flavin

On May 7, 2024, at 9:53 AM, Tom Roberts <tomor...@gmail.com> wrote:

Hi there,
--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/0f6ad0a0-b6ed-4f61-a1b7-2afab79ec250n%40googlegroups.com.

Tom Roberts

unread,
May 7, 2024, 12:34:53 PM5/7/24
to xnat_discussion
Great, thanks for confirming. Will look into downgrading Docker, but prefer to avoid it :x

Thanks again!

Tom Roberts

unread,
May 15, 2024, 4:54:51 AM5/15/24
to xnat_discussion
@John – any idea approx when you expect to have the fix implemented? Just wondering if I need to consider an alternative solution for now. No problem to wait a week or two, otherwise I'll look into another solution.

Thanks a lot.

John Flavin

unread,
May 15, 2024, 10:08:36 AM5/15/24
to xnat_di...@googlegroups.com

I don’t have a solid estimate, sorry. I have the CS work 95% finished, just need to tie up a few loose ends there. Unfortunately I have gotten delayed fixing a problem a few levels down the stack. This is probably more detail than you were looking for, but here we go.

 

The core problem is not in CS itself but is in the library we use to talk to docker, docker-client. Our version is old and out of date because they dropped support for Java 8 long ago. Docker v25 changed something in their API in a way that breaks docker-client, and since we are on an out-of-date version and can’t update it seems unlikely we would be able to contribute a fix upstream that would be accepted. We could fork docker-client and fix the problem for ourselves but that puts 100% of the support burden on us into the indefinite future which isn’t feasible. We have been contemplating updating XNAT’s Java version, which would as a side benefit let us update docker-client, but that certainly isn’t going to be done in anything like the next few weeks, or even the next few months. So to get CS working on the latest Docker I needed to switch from docker-client to a different library which still supports Java 8, docker-java. This is not a small task, but it is doable. This is the part I said was 95% finished.

 

However, during this process I discovered that the library we are switching to, docker-java, is missing support for a small part of the docker API which we rely on for an important CS feature. I opened an upstream ticket about that almost a month ago (https://github.com/docker-java/docker-java/issues/2320), but when no one responded I fixed it myself (https://github.com/docker-java/docker-java/pull/2327). However, I have no confidence that this fix will be merged and released in the upstream library before we need to use it in CS, which means that to release CS as soon as we can we’ll likely need to publish our own version of docker-java for the time being. I feel like this is a better situation than the previous alternative of forking docker-client, because at least now we have a chance of this fix being merged into docker-java and getting CS back using the main line releases.

 

So where I am at this moment is figuring out how to get my branch of docker-java tested and a jar published in such a way that we can build CS from it. And also, like I said before, finishing up the remaining 5% of CS work.

 

I’m not sure if this answer will be at all reassuring, but hopefully it is at least informative. I know this issue is impacting people so I wanted to be fully transparent about what I’m doing to fix it.

 

John Flavin

 

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Tom Roberts <tomor...@gmail.com>
Date: Wednesday, May 15, 2024 at 3:55
AM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: Re: [XNAT Discussion] Cannot pull Plugin images with xnat-docker-compose + Container Service Plugin setup (MacOS)

You don't often get email from tomor...@gmail.com. Learn why this is important

Tom Roberts

unread,
May 16, 2024, 4:58:11 AM5/16/24
to xnat_discussion
Thanks John, it is informative, and sounds involved!

I've got a couple of alternatives things to try, so I'll get to those and keep an eye out for your future updates.

Thanks again.

Filippo Manini

unread,
Aug 4, 2025, 9:54:32 PMAug 4
to xnat_discussion

Good morning everyone,

I'm jumping into this discussion because I believe I’m encountering the same issue, and I’d really appreciate some help or insight.

Here’s my setup:

  • XNAT: 1.8.10
  • Container Service: 3.4.3
  • OHIF Viewer: 3.7.1
  • Operating System: Windows 11
  • Docker: 27.5.0-rd (build 7a37716)
  • Dev Environment: Visual Studio Code + WSL (Ubuntu 24.04 LTS)

XNAT was installed via Docker using this repo: NRG XNAT Docker Compose

Following the official guide to the Container Service, I run into the following error when trying to Pull New Image:

Error Found: Could Not Pull Image from selected Hub 
Error 500: Internal Server Error 
The Docker server returned an error: org.mandas.docker.client.exceptions.DockerRequestException: Request error: GET unix://localhost:80/images/xnat/dcm2niix:latest/json: 200

Has anyone else experienced this or knows what might be causing it?

Let me know if you need more info. I’d be grateful for any suggestions or fixes.

Thanks in advance!


John Flavin

unread,
Aug 5, 2025, 8:46:08 AMAug 5
to xnat_di...@googlegroups.com
You could upgrade your Container Service to 3.5.x, which is compatible with XNAT 1.8.10 according to the compatibility matrix, and which replaces the library we use to communicate with docker. That seems like it would fix your problem. See https://groups.google.com/d/msgid/xnat_discussion/bb866da5-f0b2-4832-9f35-98641da2471fn%40googlegroups.com for more discussion around the release of this version.

John Flavin

On Aug 4, 2025, at 8:54 PM, 'Filippo Manini' via xnat_discussion <xnat_di...@googlegroups.com> wrote:


Reply all
Reply to author
Forward
0 new messages