hartym / docker-solr

Solr on Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supported tags and respective Dockerfile links

What is Solr?

Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites.

Learn more on Apache Solr homepage and in the Apache Solr Reference Guide.

wikipedia.org/wiki/Apache_Solr

Solr Logo

How to use this Docker image

To run a single Solr server:

docker run -d -p 8983:8983 -t makuk66/docker-solr

Then with a web browser go to http://localhost:8983/ to see the Admin Console (adjust the hostname for your docker host).

Single-container SolrCloud

To simulate a distributed Solr configuration ("SolrCloud" mode) in a single container, run the "cloud" example:

docker run -d -p 8983:8983 -p 7574:7574 makuk66/docker-solr \
    /bin/bash -c "/opt/solr/bin/solr -e cloud -noprompt; while true ; do sleep 3600; done"

This will take a minute or so to start. You can follow along with docker logs -f CONTAINER.

Distributed Solr

You can also run a distributed Solr configuration, with Solr nodes in separate containers, sharing a single ZooKeeper server:

Run ZooKeeper, and define a name so we can link to it:

docker run --name zookeeper -d -p 2181:2181 -p 2888:2888 -p 3888:3888 jplock/zookeeper

Run two Solr nodes, linked to the zookeeper container:

docker run --name solr1 --link zookeeper:ZK -d -p 8983:8983 \
  makuk66/docker-solr \
  bash -c '/opt/solr/bin/solr start -f -z $ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT'

docker run --name solr2 --link zookeeper:ZK -d -p 8984:8983 \
  makuk66/docker-solr \
  bash -c '/opt/solr/bin/solr start -f -z $ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT'

Create a collection:

docker exec -i -t solr1 /opt/solr/bin/solr create_collection -c collection1 -shards 2 -p 8983

Then go to http://localhost:8983/solr/#/~cloud (adjust the hostname for your docker host) to see the two shards and Solr nodes.

About this repository

This repository is available on github.com/makuk66/docker-solr, and the automated build is on the Docker Registry.

Supported Docker versions

This image has been tested with Docker version 1.5.0.

User Feedback

Issues

If you have any problems with or questions about this image, please submit a GitHub issue.

Contributing

If you have have a contribution for this repository, please send a pull request.

If you want to contribute to Solr, see the Solr Resources.

License

Solr is licensed under the Apache License, Version 2.0, and this repository is too:

Copyright 2015 Martijn Koster

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Solr on Docker

License:Apache License 2.0


Languages

Language:Shell 100.0%