Git Product home page Git Product logo

docker-solr's Introduction

Solr on Docker

Run Solr on Docker.

This repository triggers the makuk66/docker-solr trusted build on the Docker index. To run:

docker pull makuk66/docker-solr
docker run -it -p 8983:8983 -t makuk66/docker-solr

Then go to http://docker1.lan:8983/solr (adjust the hostname for your docker server).

You can run the SolrCloud example in a single container in the foreground:

docker run -it -p 8983:8983 -p 7574:7574 makuk66/docker-solr \
    /bin/bash -c "/opt/solr/bin/solr -e cloud; echo hit return to quit; read"

You can run SolrCloud in separate containers too. For example:

# pull the ZooKeeper image
docker pull jplock/zookeeper

# run ZooKeeper, and define a name so we can link to it
docker run -name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 jplock/zookeeper

# run the first Solr node, with bootstrap parameters, and pass a link parameter to docker
# so we can use the ZK_* environment variables in the container to locate the ZooKeeper container
docker run -link zookeeper:ZK -i -p 8983:8983 -t makuk66/docker-solr \
  /bin/bash -c 'cd /opt/solr/example; java -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DzkHost=$ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT -DnumShards=2 -jar start.jar'

# in separate sessions, run two more zookeepers
docker run -link zookeeper:ZK -i -p 8984:8983 -t makuk66/docker-solr \
/bin/bash -c 'cd /opt/solr/example; java -DzkHost=$ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT -DnumShards=2 -jar start.jar'
docker run -link zookeeper:ZK -i -p 8985:8983 -t makuk66/docker-solr \
/bin/bash -c 'cd /opt/solr/example; java -DzkHost=$ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT -DnumShards=2 -jar start.jar'

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

docker-solr's People

Contributors

makuk66 avatar

Watchers

Anthony Bovasso avatar James Cloos avatar

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.