Running SOLR in Docker - tooltwist/documentation GitHub Wiki

Steps used by Phil to set up a SOLR example.

  1. Get the IP address of boot2docker

     $ boot2docker ip
     192.168.59.103              <-- remember this
    
  2. Start a docker container.

     $ docker run --name my-solr -it -d -p 8983:8983 -t makuk66/docker-solr
    
  3. Log in to the SOLR container.

     $ docker exec -it my-solr /bin/bash
    
  4. Load example data.

     $ cd /opt/solr
     $ bin/solr create -c philcal   <-- replace this "core name" if you wish
     $ bin/post -c philcal example/exampledocs/*.json
    
  5. Run a search in your browser. For example http://192.168.59.103:8983/solr/philcal/select?q=Greek. Replace the IP address as required, to match the boot2docker ip noted in step 1.

  6. Similarly, the admin UI can be accessed at http://192.168.59.103:8983/solr/#/.

If this is working fine, your Docker container can be used to run and administer SOLR in the normal SOLR manner.

Reference

See http://apache.mirrors.ionfish.org/lucene/solr/ref-guide/apache-solr-ref-guide-5.0.pdf.