When sitting down in front of a new project, I alwasy find it hard to start because code reading is not easy at all. Sublimetext + ctags does help, but not perfect. OpenGrok is good but needs configure. So here's the solution: put OpenGrok in Docker, and use a one-liner to xref your code.

Credit goes to itszero. I just forked it and updated source code to the latest version, and did some minor improvments.

Please visit https://github.com/steinwaywhw/docker-opengrok for details. The docker image is hosted on dockerhub.

Usage

To start the OpenGrok, simply run:

docker run -d -v [source to be indexed on host]:/src -p [public port]:8080 steinwaywhw/opengrok

It may take a while for the indexer to finish the first-time indexing, after that, the search engine is available at http://host:[public port]/source/.

Note

The project supports dynamic index updating through inotifywait recursively on the source folder. However, touch doesn't help. You should add or delete or modify the content of some source file to make it happen.