May 3, 2020
Solr:8 using Docker on Ubuntu 19.10 and Dovecot 2.3.x
This has become really simple using dockers and the newer versions since I wrote the old guide on this subject some time ago.
Get and run dockered version of solr like this:
docker pull solr
Then create a folder where solr will save config and data files. This will serve as a host mounted folder for the container. For example:
Change the owner to solr for this:
chown 8983:8983 /var/solrd
Now run the solr through this command line:
docker run -v "/var/solrd:/var/solr" -p YOUR_SOLR_PORT:8983 --name mysolr solr:8 solr-precreate dovecot
Once solr is running, the host directory will be filled with default config files for the dovecot core. We need to go in there and follow the steps on this page. More specifically:
Delete both managed-schema and solrconfig.xml under /var/solrd/data/dovecot/conf folder.
Copy solr-config-7.7.0.xml and solr-schema-7.7.0.xml to the above folder as solrconfig.xml and schema.xml. Ensure proper filer owner (see above).
Stop the docker image:
docker stop mysolr
Restart the docker image to have the changes take effect:
docker start mysolr
That’s it. The dovecot configuration remains as I described in one of my previous posts here.