-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix docker volume persistent for directory of custom org images #95
base: master
Are you sure you want to change the base?
Fix docker volume persistent for directory of custom org images #95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Why you copy the orgs.dist images in the dockerfile build process and in the entrypoint is that not the double work?
If the orgs images are only coming from misp and should not be user changeable than it makes it no sense to add a local file path to it.
If it is user customized than it makes no sense to delete all the user changes in your rsync command or?
what should it be?
Kind regards
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. |
server/files/entrypoint_nginx.sh
Outdated
@@ -104,6 +104,7 @@ sync_files(){ | |||
for DIR in $(ls /var/www/MISP/app/files.dist); do | |||
rsync -azh --delete "/var/www/MISP/app/files.dist/$DIR" "/var/www/MISP/app/files/" | |||
done | |||
rsync -azh --delete "/var/www/MISP/app/webroot/img/orgs.dist/" "/var/www/MISP/app/webroot/img/orgs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the --delete
here will delete any org images uploaded by the user - can you verify that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified and of course the --delte flag was wrong. Fixed it.
I verified and of course the --delte flag was wrong. Fixed it. |
But for that I understand is the second “custom” path there? |
@garrit-schroeder , |
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? |
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. |
I have adjusted the pull request and created a new one.