Sample Dockerfiles for running Solr in a docker container. With this approach we have separated the service and configuration into two containers. This allows our team to re-use the base solr
container across many projects. The configuration for any core(s) happens in a separate core
container which is layered on the first. Settings are exposed via environment variables which may be overridden in the core
container.
-
Build / find a JRE 8 container (update the
solr/Dockerfile
to point at this container) -
Build the
solr
containercd solr docker build -t solr:5.3.0-1 .
-
Build the
core
containercd core docker build -t solr-core .
-
Run the container
docker run -P solr-core