docker and storescu

74 views
Skip to first unread message

Jonathan Brooks

unread,
May 30, 2023, 12:30:51 PM5/30/23
to dcm4che
Hi,

I'm trying to push a lot of DICOM data into an unsecured archive running under docker.

Following some helpful suggestions on the mailbase from Vrinda and Gunter, I'm using the docker container with dcm4che-tools and the following command:

$ docker run -v /volume1/DCM4CHE/OLDNAS:/tmp --rm --network=dcm4chee_default dcm4che/dcm4che-tools find /tmp/DICOM -type f -print0 | xargs -0 -n 10 storescu -cDCM4CHEE@arc:11112

But I keep on getting the following error:

xargs: storescu: No such file or directory
write /dev/stdout: broken pipe

If I supply the full path to storescu I get an identical error:

$ docker run -v /volume1/DCM4CHE/OLDNAS:/tmp --rm --network=dcm4chee_default dcm4che/dcm4che-tools find /tmp/DICOM -type f -print0 | xargs -0 -n 10 /opt/dcm4che/bin/storescu -cDCM4CHEE@arc:11112
xargs: /opt/dcm4che/bin/storescu: No such file or directory
write /dev/stdout: broken pipe

If I leave out the storescu command xargs returns lists of DICOM images split into groups of 10 as requested.

What am I doing wrong!!!??

Cheers, Jon

Jonathan Brooks

unread,
May 31, 2023, 11:41:02 AM5/31/23
to dcm4che
Solution was simple (surrounding the command with sh -c ' ' i.e. sh -c 'find ... xargs .... storescu ', though not sure about the explanation for why it works... best guess is that the dcm4che-tools container (JShell) doesn't play nice with standard unix commands (or there is something weird about the shell that you're given when running commands).

$ docker run -v /volume1/DCM4CHE/OLDNAS:/tmp --rm --network=dcm4chee_default dcm4che/dcm4che-tools sh -c 'find /tmp/DICOM -type f -print0 | xargs -0 -n 10 storescu -cDCM4CHEE@arc:11112'

Works.

Hope this helps someone.

Cheers, Jon
Reply all
Reply to author
Forward
0 new messages