I'm trying to follow this tutorial: https://hub.docker.com/r/opengrok/docker/
This is what I did:
mkdir /home/testuser/OpenGrokTest
cp -R SmallCppProject /home/testuser/OpenGrokTest/
docker pull opengrok/docker
docker run -d -v /home/testuser/OpenGrokTest/:/opengrok/src -p 8080:8080 opengrok/docker:latest
Now I can access opengrok using localhost:8080 and it is there:
However, as you can see there is nothing. The project is very small (just 5 cpp files) and I also waited ~15 minutes "just in case" but nothing changed.
I feel this is a very simple problem but tutorial is not mentioning any additional steps, so I don't know what's wrong.
I've solved this 5 minutes after I've posted the question ... but I believe this might be useful for someone in future because it's quite a trap, so I will leave it. There was nothing wrong with opengrok tutorial, the problem was inside my SmallCppProject. It had .git directory and inside that directory there were relative symlinks to repo. Those symlinks were broken because when I've copied the project the directory was changed. Apparently this was a problem because after removing .git directory everything is fine now. Although I think opengrok should be "prepared" for such things and ignore broken links.
Edit: Actually this was not about broken symlinks, it's about .git directory in general, so there is clearly something wrong with latest opengrok image for docker. Current version is 1.7.2 and in general if I just put sources then opengrok works, however if I add those sources to git then opengrok can't inititalize.