docker-misp icon indicating copy to clipboard operation
docker-misp copied to clipboard

Fix docker volume persistent for directory of custom org images

Open garrit-schroeder opened this issue 4 years ago • 7 comments

I have adjusted the pull request and created a new one.

garrit-schroeder avatar Feb 22 '21 12:02 garrit-schroeder

The docker file will copy the files to a orgs.dist directory to keep a distribution level copy of the images. The entrypoint (should) then syncs this distribution copy to make sure it's in sync with the real directory. This is because users of MISP has the ability to upload Org images when creating Orgs in MISP.

coolacid avatar Feb 26 '21 14:02 coolacid

I verified and of course the --delte flag was wrong. Fixed it.

garrit-schroeder avatar Feb 26 '21 22:02 garrit-schroeder

The docker file will copy the files to a orgs.dist directory to keep a distribution level copy of the images. The entrypoint (should) then syncs this distribution copy to make sure it's in sync with the real directory. This is because users of MISP has the ability to upload Org images when creating Orgs in MISP.

But for that I understand is the second “custom” path there?

8ear avatar Feb 27 '21 07:02 8ear

We are talking about the manage file tab in Server settings. Screenshot_20210227-090336

The Top upload directory contains default images of misp but the user has also the possibility to upload images there. That's why we need this workaround of syncing the default files. A docker volume will otherwise overwrite this directory.

The second location of custom images is empty by default so we can just use a normal docker volume. No workaround required.

garrit-schroeder avatar Feb 27 '21 08:02 garrit-schroeder

@garrit-schroeder , Thanks for clarification. That was not clear enough for me.

8ear avatar Feb 27 '21 12:02 8ear

So if I read this correctly, during image build you stash a copy of the distributed images; and at container start you ensure that all the distributed images are present in the mounted volume. If that's right, then +1 from me 👍

My only substantive comment: please add instructions to the README about making a volume with local org images, and mention the distributed images are put there automagically.

I see this has PR been open a few months, is something blocking merge here?

chrisinmtown avatar May 19 '21 13:05 chrisinmtown

You are a 100% correct.

There is nothing blocking this PR as far as I can tell. Just some additional notes in the README file maybe.

garrit-schroeder avatar May 19 '21 13:05 garrit-schroeder