fuzzball-muck/fuzzball

Fix Docker Issues

tanabi opened this issue · 3 comments

As reported on my PR by @skylerbunny - see #650 for original notes.

I think figured out why the addition of your lines to build the help files confused me as 'Why is that necessary?' In part I didn't realize that the help files are built from .raw files at build time. Now that I understand that...

First, an easy error to fix, and the Makefile does this right: it should be prochelp ../src/muckhelp.raw help.txt muckhelp.html (note help.txt, not muckhelp.txt). However, I suspect that these lines still shouldn't be needed in the Dockerfile, because I believe they do already run, and what this reveals is a different issue. Read on...

--

Playing around in the container, it looks like running make install implicitly runs make help before installing into your ${PREFIX}. What prochelp builds, and where those files are copied, though, is ${PREFIX}/share/doc/fbmuck. This is good implementation of global files, and would in fact have been copied from the build container to the run container.

BUT...what an individual fbmuck process seems to want these files to live in, however, is /data. That's why I made that copy step later in the Dockerfile that's specific to the basedb. I now realize THAT should be unnecessary too...

I suspect to make this seamless (and this would be true for both Docker and non-Docker implementations of Fuzzball), the fbmuck process itself should look for the help files where they're installed globally: ${PREFIX}/share/doc/fbmuck and not inside some given MUCK's data directory.


Hmm. To fully elaborate, now that I've taken a few minutes to think on it, maybe I'd amend this to (realizing that 'But I want server specific help files to still be possible if someone wants to copy them there'), maybe the behavior of the fbmuck process, for the help files, wants to be:

Check <Your-Muck-Data-Directory/data. If not found...
Check ${PREFIX}/share/doc/fbmuck If not found...
Fail with an error.

tanabi commented

I've started implementing this as first checking local files and then 'global' or system files which corrects the problem Skyler mentioned. I'll also need to remove the extra prochelp call from Dockerfile.

The first step here was to figure out how to inject the path specified in configure to the compile process, which I have done as the define FBMUCK_GLOBAL_DATA_PATH. I will work on implementing the logic here.

tanabi commented

I've done all the C work needed for this, and I've modified the dockerfile, but I wanna test it before I commit. And I'm pooped, so I'll test it tomorrow :)

tanabi commented

Wanted to put the release notes for this here, as they are important to anyone that cares about this issue!

Does a couple things:

  • Makes the global installed documentation directory made by 'configure' a search location for help/man/mpi files
  • Changes Docker to remove some unnecessary doc build steps and makes it so when Docker sets up a new MUCK, it deletes the help/man/mpi files in the 'data' directory so these files will feed off the global installed location. This means, when you update your container, your documentation will also get updated.

As a caveat, anyone using Fuzzball and Docker will need to manually remove the help/man/mpi files from their data volumn in order to take advantage of this fix. For the reasons of flexibility, I do not delete these files from existing volumes, just newly configured ones.