PixelMed permissions in Docker

Issue #897 resolved
Alexandr Zub created an issue

In openrem docker version ct_toshiba executed pixelmed with accompanied by an error. need permission to run

Comments (15)

  1. Alexandr Zub reporter

    For example i fixed it by run this command: docker exec -u 0 openrem chmod 777 /home/app/pixelmed/pixelmed.jar

  2. Ed McDonagh

    Thanks Alexandr - I think the fix in Pull Request #448 will fix it.

    Really appreciate the bug report.

    I can’t find your name when I use @ - there are no Alexandr Zub names in the list! What is your Bitbucket username?

  3. Ed McDonagh

    docker pull openrem/openrem:issue897pixelmedpermissions

    And change the image name in the three places in docker-compose if anyone wishes to test (and feed back please!)

    From: image: openrem/openrem:develop

    To: image: openrem/openrem:issue897pixelmedpermissions

  4. Ed McDonagh

    @David Platten we have another problem with volumes… 😭

    If I copy a file into the /imports/ folder/volume, it is always owned by root, group 999. I’ve tried all sorts to get it to at least 777 permissions, but to no avail. The only ‘solution’ I have found so far is to do some weird piping through tar when doing the cp, which will alienate any normal users and probably not work with Windows.

    I’ll look again later, but I think this is part of the issue @Alexandr Zub is hitting.

    It might be that we need to run the container as root rather than a non-root user 😠

  5. David Platten

    @Ed McDonagh I don’t think I have ever needed to put anything into the imports folder. What is it for?

  6. Ed McDonagh

    If you want to import from a local file without using DCMTK storescu, would you not need to do something like:

    docker cp localfolder/mydicomfile.dcm openrem:/imports/
    docker-compose exec openrem openrem_rdsr.py /imports/mydicomfile.dcm
    

  7. Ed McDonagh

    Actually it is also where orthanc puts the files before calling OpenREM to import them. I have what I think is a working solution by running the container (inside) as root rather than app - let me work it though.

  8. Ed McDonagh

    So it seems that when a file is saved to /imports/ it has ownership app:app whereas a folder gets root:999. At the end of the toshiba routine, the folder is deleted, and doesn’t work.

    If I change the openrem container to have everything owned by root, then it all seems to work.

  9. Ed McDonagh

    @Alexandr Zub can you try again with a fresh pull of the image:

    docker pull openrem/openrem:issue897pixelmedpermissions

    You might need to try with a new instance, or to destroy the volumes, but it might work with what you have already.

  10. Log in to comment