PixelMed permissions in Docker
In openrem docker version ct_toshiba executed pixelmed with accompanied by an error. need permission to run
Comments (15)
-
reporter -
Fixing ownership and permissions for Pixelmed in Docker. Refs
#897→ <<cset 50bcfc944c03>>
-
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? -
reporter Thank you very much my username is @zzzubalex
-
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
-
@David Platten we have another problem with volumes…
If I copy a file into the
/imports/
folder/volume, it is always owned byroot
, group999
. I’ve tried all sorts to get it to at least777
permissions, but to no avail. The only ‘solution’ I have found so far is to do some weird piping through tar when doing thecp
, 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 -
@Ed McDonagh I don’t think I have ever needed to put anything into the imports folder. What is it for?
-
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
-
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.
-
So it seems that when a file is saved to
/imports/
it has ownershipapp:app
whereas a folder getsroot: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.
-
I also can’t work out how/where the non-Toshiba files get deleted after import!
-
Added root ownership in changeset 744d5b7 (referenced wrong issue!)
-
@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.
-
Removing setting user to root in Dockerfile (no longer necessary); updating changes string. Refs
#897→ <<cset 5ba3d0a19033>>
-
- changed status to resolved
Merged in issue897pixelmedpermissions (pull request #448)
Fixing ownership and permissions for Pixelmed in Docker, everything now runs as root within container. Fixes
#897→ <<cset 9a206f005e90>>
- Log in to comment
For example i fixed it by run this command: docker exec -u 0 openrem chmod 777 /home/app/pixelmed/pixelmed.jar