Core - Enhanced the validity check of Nginx's dhparam.pem file during configuration phase
Whenever I tried running the misp-core image, it'd get stuck on an infinite loop of Nginx trying to start up, then failing due to invalid DHParam.pem file.
For unknown reasons, the file existed, but was empty every time.
This PR fixes that by enhancing the dhparam.pem file check, adding a contents check of the file, and if anything other than a valid DH Params are found, regenerates the file.
This looks to me like a workaround to a runtime (and singular) issue. Not sure it would make sense to address it explicitly.
On my server, I have tried resetting docker to a clean state several times, and always, the initial configuration got stuck on the dhparam file existing on disk, but being empty, thus leading to Nginx failing to start.
This commit does not alter the overall flow of the configuration, only adds a content verification step that, in my opinion, should have been present from the start.
I tried debugging why the file initially failed to generate, but that didn't lead to anything. This, however, worked fine. And finally allowed the container to start correctly.
Mmm, did you try with the latest docker version available from docker.com?