Code Monkey home page Code Monkey logo

docker-solr's Introduction

Solr on Docker

Run Solr on Docker.

This repository triggers the dockerimages/docker-solr trusted build on the Docker index.

!!!Importent Note!!! This is for Config and testing a Production Ready Image for Solr would be dockerimages/docker-solr-systemd For Infos how to Produce a Docker Production Ready Ubuntu env visit dockerimages/production-env

To run:

docker run -it -p 127.0.0.1:8983:8983 -t dockerimages/docker-solr

Then go to http://localhost:8983/solr

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

docker run -it -p 127.0.0.1:8983:8983 \
-p 127.0.0.1:7574:7574 \
dockerimages/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:

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

docker run -name zookeeper \
-p 127.0.0.1:2181:2181 \
-p 127.0.0.1:2888:2888 \
-p 127.0.0.1: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 127.0.0.1:8983:8983 \
    -t dockerimages/docker-solr \
    /bin/bash -c '\
        cd /opt/solr/example; \
        java -jar \
        -Dbootstrap_confdir=./solr/collection1/conf \
        -Dcollection.configName=myconf \
        -DzkHost=$ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT \
        -DnumShards=2 \
        start.jar';

in separate sessions, run two more zookeepers

docker run -i \
-link zookeeper:ZK \
-p 127.0.0.1:8984:8983 \
-t dockerimages/docker-solr \
/bin/bash -c '\
    cd /opt/solr/example; \
    java -jar \
    -DzkHost=$ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT \
    -DnumShards=2 \
    start.jar';
 
docker run -i \
-link zookeeper:ZK \
-p 127.0.0.1:8985:8983 \
-t dockerimages/docker-solr \
/bin/bash -c '\
    cd /opt/solr/example; \
    java -jar \
    -DzkHost=$ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT \
    -DnumShards=2 \
    start.jar';

Then go to http://localhost: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 frank-dspeed avatar

Watchers

James Cloos avatar Fernando Zavala 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.