A container is an abstraction layer to run a software application in a lightweight environment. Containerization provides a standard and a secure way to build, ship and run applications anywhere. Docker images of Solr and Banana are available for quick installation and run.
Running Solr and Banana Docker Containers
To run Solr and Banana containers, you may follow these steps:
Running Solr:
$ docker run --name solr --network="host" -d -p 8983:8983 -t solr -c
Creating a collection and indexing a dataset. We will use the shipped books dataset:
$ docker exec solr bin/solr create -c books
$ docker exec solr bin/post -c books example/exampledocs/books.csv
Running Banana:
$ docker run --name banana --network="host" -d -t aaadel/banana:1.6.25
Check running containers:
$ docker ps
The output should be something like this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 23c18d55c980 aadel/docker-banana:1.6.25 "docker-entrypoint.s…" 47 minutes ago Up 47 minutes banana 370e816403d3 solr "docker-entrypoint.s…" 48 minutes ago Up 48 minutes solr
Now, navigate to http://localhost:9901 in a web browser and the default Banana dashboard should be displayed. To view the indexed data, click “New” on the top-right corner and select “Non-timeseries dashboard”. On the new dashboard, open the settings window and select books collection from the Solr tab, data should appear inside the table panel.
Note: in this post, “host” network model was used which means that containers must run on the same host in order to communicate.
2 replies on “Solr and Banana on Docker”
[…] sales. If you have Docker installed, docker may be used to quickly run Solr and Banana, check this post for more details. Open Banana and load the pre-configured dashboard by clicking Load on the top […]
Your site is very good and we used it. I hope you are always successful.