Skip to content

Instantly share code, notes, and snippets.

@chriseldredge
Created December 12, 2017 16:55
Show Gist options
  • Save chriseldredge/3ffccd862953718041372429b98625f5 to your computer and use it in GitHub Desktop.
Save chriseldredge/3ffccd862953718041372429b98625f5 to your computer and use it in GitHub Desktop.
Docker Solr with embedded ZooKeeper
docker run --name solr -p 8983:8983 -p 9983:9983 \
--mount type=bind,source=$PWD/zkrun.sh,target=/docker-entrypoint-initdb.d/zkrun.sh \
--mount type=volume,source=solr-home,target=/opt/solr/server/solr \
solr:latest
#!/bin/sh
echo SOLR_HOST=localhost >> /opt/solr/bin/solr.in.sh
echo SOLR_OPTS=\"\$SOLR_OPTS -DzkRun\" >> /opt/solr/bin/solr.in.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment