Simplifying Solr by Running It on Docker

It is now even easier to get started with Solr: you can run Solr on Docker with a single command:

$ docker run --name my_solr -d -p 8983:8983 -t solr

That creates a new Docker container using the new official Solr image, which includes OpenJDK and the latest release of Solr.

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

To use Solr, you need to create a “core”, an index for your data. For example:

$ docker exec -it --user=solr my_solr bin/solr create_core -c gettingstarted

In the web UI if you click on “Core Admin” you should now see the “gettingstarted” core.

If you want to load some example data:

$ docker exec -it --user=solr my_solr bin/post -c gettingstarted example/exampledocs/manufacturers.xml

In the UI, find the “Core selector” popup menu and select the “gettingstarted” core, then select the “Query” menu item. This gives you a default search for “:” which returns all docs. Hit the “Execute Query” button, and you should see a few docs with data. Congratulations!

This video demonstrates the image used with the user interface (Kitematic) from the Docker Toolbox on OSX:

 

Further instructions, including on how to run in a multi-container configuration can be found in the documentation, with further details in the FAQ. The code for this image is available in the docker-solr Github repository.

For those interested in how this came together: the image is based on the popular makuk66/docker-solr image, and you can see how that was further refined to be even friendlier to use and to better fit into Docker’s maintenance model in this pull request. A big thank-you to the Docker team for their help there.

Share the knowledge

You Might Also Like

The State of Enterprise Search in 2026

For years, organizations focused on helping users find information faster. Today, they...

Read More

Semantic Search for Knowledge Management: Helping Employees Find Answers, Not Documents

Policies, procedures, documentation, collaboration tools, support content, product information, and institutional knowledge...

Read More

Semantic Search for B2B Commerce: Why Product Discovery Is Becoming a Competitive Advantage

B2B buyers increasingly expect the same intuitive search experiences they encounter in...

Read More

Quick Links