Skip to content

Instantly share code, notes, and snippets.

@xingh
Last active March 30, 2016 18:43
Show Gist options
  • Save xingh/64512f0ad30ad57ae4a107acbe2bdf42 to your computer and use it in GitHub Desktop.
Save xingh/64512f0ad30ad57ae4a107acbe2bdf42 to your computer and use it in GitHub Desktop.
cd \Projects\External\search.cloud
docker-machine start dev
docker-machine ls
docker-machine env --shell powershell dev | iex
docker ps
# Solr 4.x
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
docker run --name search_solr1 --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';
docker run --name search_solr2 --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';
docker exec -it --user=solr search_solr1 bin/solr create_core -c gettingstarted
docker exec -it --user=solr search_solr1 bin/post -c gettingstarted example/exampledocs/manufacturers.xml
# Solr 5.x
$ docker run --name zookeeper -d -p 2181:2181 -p 2888:2888 -p 3888:3888 jplock/zookeeper
docker run --name solr1 --link zookeeper:ZK -d -p 8983:8983 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 solr bash -c '/opt/solr/bin/solr start -f -z $ZK_PORT_2181_TCP_ADDR:$ZK_PORT_2181_TCP_PORT'
docker exec -it solr1 bin/solr create_collection -c appleseed-public -shards 2 -p 8983
docker exec -it solr1 bin/solr create_core -c gettingstarted
docker exec -it solr1 bin/post -c gettingstarted example/exampledocs/manufacturers.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment