Directly downloaded from official source: https://github.com/OpenGrok/OpenGrok/releases/tag/1.1-rc33
- SSH with root access
- Tomcat 9
- JRE 8(Required for Opengrok 1.0)
- Preconfigured cron task for reindexing every hour)
cd
docker build -t my_opengrok .
docker run -d -v <path/to/your/src>:/src -p 8080:8080 -p 2222:22 my_opengrok
Point your web browser to http://localhost:8080/source. If you get an error regarding the CONFIGURATION parameter and FileNotFoundException, wait a few minutes for the indexer to finish and then refresh the page.
https://github.com/oracle/opengrok
Your own special configuration needs to be in /var/opengrok/etc/read-only.xml
Refer to https://github.com/oracle/opengrok/wiki/Read-only-configuration for details
/opengrok/bin/OpenGrok help --detailed to see what values can be provided
OPENGROK_READ_XML_CONFIGURATION=/var/opengrok/etc/read-only.xml /opengrok/bin/OpenGrok index
You may want to modify your container's /scripts/index.sh to use this.
First inspect the docker container so you can find the address to connect, then ssh into it using root/root
If you decide to use your maven-built opengrok, make sure you extract your distribution/target/opengrok-xxx.tar.gz into your container's /opengrok and then run OpenGrok deploy. Do not simply copy over source.war into tomcat's webapps!