Giter Site home page Giter Site logo

docker's Introduction

โ— ๐Ÿ™‹โ€โ™‚๏ธ NOTE: This repository is archived. It is no longer used to build official OpenGrok Docker images. These are now built from within the official OpenGrok source repository. The location of the images on Docker Hub remains the same. It is just the build process that changed. See https://github.com/oracle/opengrok/tree/master/docker for more details.

A Docker container for OpenGrok

OpenGrok from official source:

Directly downloaded from official source: https://github.com/oracle/opengrok/releases/

You can learn more about OpenGrok at http://oracle.github.io/opengrok/

The container is available from DockerHub at https://hub.docker.com/r/opengrok/docker/

When not to use it

This image is simple wrapper around OpenGrok environment. The indexer and the web container are not tuned for large workloads. If you happen to have either large source data (e.g. AOSP or the like) or stable service or both, it is advisable to run the service standalone.

Additional info about the container:

  • Tomcat 9
  • JRE 8 (Required for Opengrok 1.0+)
  • Configurable mirroring/reindexing (default every 10 min)

The mirroring step works by going through all projects and attempting to synchronize all its repositories (e.g. it will do git pull for Git repositories).

The indexer/mirroring is set so that it does not log into files.

How to run:

The container exports ports 8080 for OpenGrok.

docker run -d -v <path/to/your/src>:/opengrok/src -p 8080:8080 opengrok/docker:latest

The volume mounted to /opengrok/src should contain the projects you want to make searchable (in sub directories). You can use common revision control checkouts (git, svn, etc...) and OpenGrok will make history and blame information available.

By default, the index will be rebuild every ten minutes. You can adjust this time (in minutes) by passing the REINDEX environment variable:

docker run -d -e REINDEX=30 -v <path/to/your/src>:/opengrok/src -p 8080:8080 opengrok/docker:latest

Setting REINDEX to 0 will disable automatic indexing. You can manually trigger an reindex using docker exec:

docker exec <container> /scripts/index.sh

Setting INDEXER_OPT could pass extra options to opengrok-indexer. For example, you can run with:

docker run -d -e INDEXER_OPT="-i d:vendor" -v <path/to/your/src>:/opengrok/src -p 8080:8080 opengrok/docker:latest

To remove all the */vendor/* files from the index. You can check the indexer options on

https://github.com/oracle/opengrok/wiki/Python-scripts-transition-guide

To avoid the mirroring step, set the NOMIRROR variable to non-empty value.

To display Indexer logs, use:

docker logs <container_name>

OpenGrok Web-Interface

The container has OpenGrok as default web app installed (accessible directly from /). With the above container setup, you can find it running on

http://localhost:8080/

The first reindex will take some time to finish. Subsequent reindex will be incremental so will take signigicantly less time.

Inspecting the container

You can get inside a container using the command below:

docker exec -it <container> bash

Enjoy.

docker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker's Issues

Add LDAP authentication integration

In many cases, access to source code should be protected (companies policies).
We need to add the ability to integraete an LDAP authentication mechanism to the docker image of Opengrok.

restructure src/data root

Currently the indexer is set to use /src and /data and source/data root and Dockerfile does some dancing around symlinking /var/opengrok/{src,data} to these directories. This should not be necessary. Also, the source and data root could be under /opengrok.

SSH needed?

I wonder if the SSH daemon in this image is really needed. Inspection of the image can easily be done with docker exec -t -i <container> /bin/bash, indexing commands can be done with docker exec as well and data is accessed via mounted volumes. So what would the SSH access be good for?

populate the webapp with initial configuration and a message before initial index is done

Seeing the following after starting the container:

There was an error!

CONFIGURATION parameter has not been configured in web.xml! Please configure your webapp.

Unable to determine source root path. Missing configuration?

java.io.FileNotFoundException: Unable to determine source root path. Missing configuration?
at org.opensolaris.opengrok.web.PageConfig.checkSourceRootExistence(PageConfig.java:1494)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:222)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:444)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.opensolaris.opengrok.web.StatisticsFilter.doFilter(StatisticsFilter.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.opensolaris.opengrok.web.AuthorizationFilter.doFilter(AuthorizationFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1374)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Allow user to set reindexing method and frequency

I'd like to have OpenGrok reindex only on startup, or manually.
Other users might want to have it reindex once a day or at some arbitrary period.

It would be best if this is passed to the container at the docker run command, with manual reindexing done using the docker exec command.

how to index the git data ?

I know few ways to get git repo data.

1)to write a script to clone all the repo's to /src.
2)use repo tool to repo sync with git repo's.

we can't map to git server for git folder to index. as there will be bare data.

Can you please guide me how to index the git repo's data to opengrok ?(in large data)

'*' or '?' not allowed as first character in WildcardQuery

The help page says:
you can use a * or ? symbol as the first character of a search (unless not enabled using indexer option -a).

However, it's not enabled by default, it seems. Is there any reason not enabling it by default?
I'm using the latest OpenGrok docker image as of today.

Default URL

I am wondering why the default URL is /source instead of /. Is there any reason to expose the tomcat default stuff? Wouldn't it be easier to integrate this container into different environments with a default URL of /?

Opengrok docker image repository synchronization

Hi,

Reading Repository synchronization at Opengrok wiki, I wonder if in the Opengrok docker image is supported opengrok-sync to sync and index a Git code repository or run opengrok-reindex-project after a Git pull.

I did some tests and after I updated a Git repository and ran the script indexer (index.sh), the newly added files are not able to be found by searching in path field. I had to remove all the indexed data and run again the indexer (this way is very slow because the codebase weight 10 GB and the indexer takes 3h to finish).

Should I run opengrok-reindex-project instead of index.sh?

auto-deploy on push

It would be nice to have a way how to quickly check the new image using deploy phase.

index files?

Is there a path I can volume mount or a way I can persist the index files opengrok writes to disk outside of the container?

Push official opengrok docker image to docker hub

First, it was about time to do this. :) And great you started to do this finally in OpenGrok repo. ๐Ÿ‘

To me this docker image seems 'Official' opengrok docker image.
Yet I could not find it from docker hub :

After the image gets pushed automatically some meta info could be shown in readme.md like layers size:

Example of layer calculation of currently most loaded opengrok docker image:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.