{"id":16060838,"url":"https://github.com/geerlingguy/solr-container","last_synced_at":"2025-08-16T15:17:53.579Z","repository":{"id":54258017,"uuid":"95846158","full_name":"geerlingguy/solr-container","owner":"geerlingguy","description":"Ansible Container project that manages the lifecycle of Apache Solr on Docker.","archived":false,"fork":false,"pushed_at":"2025-01-31T04:41:54.000Z","size":74,"stargazers_count":19,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T12:38:52.431Z","etag":null,"topics":["ansible","ansible-container","apache-solr","container","docker","image","lucene","search","solr"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/geerlingguy/solr/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geerlingguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"geerlingguy","patreon":"geerlingguy"}},"created_at":"2017-06-30T03:49:18.000Z","updated_at":"2025-01-31T04:41:58.000Z","dependencies_parsed_at":"2022-08-13T10:10:48.960Z","dependency_job_id":"725fcdc1-9dc6-4f06-aa48-42ac90cfcfb4","html_url":"https://github.com/geerlingguy/solr-container","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/geerlingguy/solr-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fsolr-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fsolr-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fsolr-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fsolr-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geerlingguy","download_url":"https://codeload.github.com/geerlingguy/solr-container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fsolr-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270729271,"owners_count":24635395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-container","apache-solr","container","docker","image","lucene","search","solr"],"created_at":"2024-10-09T04:06:43.985Z","updated_at":"2025-08-16T15:17:53.551Z","avatar_url":"https://github.com/geerlingguy.png","language":null,"funding_links":["https://github.com/sponsors/geerlingguy","https://patreon.com/geerlingguy"],"categories":[],"sub_categories":[],"readme":"# Apache Solr Container (Built with Ansible)\n\n[![Build](https://github.com/geerlingguy/solr-container/actions/workflows/build.yml/badge.svg)](https://github.com/geerlingguy/solr-container/actions/workflows/build.yml) [![Docker pulls](https://img.shields.io/docker/pulls/geerlingguy/solr)](https://hub.docker.com/r/geerlingguy/solr/)\n\nThis project is composed of three main parts:\n\n  - **Ansible project**: This project is maintained on GitHub: [geerlingguy/solr-container](https://github.com/geerlingguy/solr-container). Please file issues, support requests, etc. against this GitHub repository.\n  - **Docker Hub Image**: If you just want to use [the `geerlingguy/solr` Docker image](https://hub.docker.com/r/geerlingguy/solr/) in your project, you can pull it from Docker Hub.\n  - **Ansible Role**: If you need a flexible Ansible role that's compatible with both traditional servers and containerized builds, check out [`geerlingguy.solr`](https://galaxy.ansible.com/geerlingguy/solr/) on Ansible Galaxy. (This is the Ansible role that does the bulk of the work in managing the Apache Solr container.)\n\n## Versions\n\nCurrently maintained versions include:\n\n  - `9.x`, `9.7.0`, `latest`: Apache Solr 9.x\n  - `8.x`, `8.11.4`: Apache Solr 8.x\n  - `7.x`, `7.7.3`: Apache Solr 7.x\n\n## Standalone Usage\n\nIf you want to use the `geerlingguy/solr` image from Docker Hub, you don't need to install or use this project at all. You can quickly build a Solr container locally with:\n\n    docker run -d --name=solr -p 8983:8983 geerlingguy/solr:latest /opt/solr/bin/solr start -p 8983 -f -force\n\nYou can also wrap up that configuration in a `Dockerfile` and/or a `docker-compose.yml` file if you want to keep things simple. For example:\n\n    ```\n    version: \"3\"\n    \n    services:\n      solr:\n        image: geerlingguy/solr:latest\n        container_name: solr\n        ports:\n          - \"8983:8983\"\n        restart: always\n        # See 'Custom and Persistent Solr cores' for instructions for volumes.\n        volumes: []\n        command: [\"/opt/solr/bin/solr\", \"start\", \"-p\", \"8983\", \"-f\", \"-force\"]\n\nThen run:\n\n    docker-compose up -d\n\nNow you should be able to access the Solr admin dashboard at `http://localhost:8983/`.\n\n### Custom and Persistent Solr cores\n\nThe default installation includes a `collection1` core in the `SOLR_HOME` directory, `/var/solr`.\n\nApache Solr will autodiscover any Solr cores in `SOLR_HOME` by searching for `core.properties` files inside each subdirectory. A standard convention for a single Solr core is to to mount a host directory as a volume with the core directory, containing the core's `conf`, `data`, and `core.properties` files.\n\nHere's an example minimal `core.properties` file, for a core named `mysearch`:\n\n    name=mysearch\n    config=solrconfig.xml\n    schema=schema.xml\n    dataDir=data\n\nSo, if you have a solr core directory named `mysearch` (with a `mysearch/core.properties` file inside, and a `conf` and `data` directory for storing Solr configuration and index data, respectively), which looks like this:\n\n    mysearch_conf/\n    ├── conf\n    │   ├── elevate.xml\n    │   ├── mapping-ISOLatin1Accent.txt\n    │   ├── protwords.txt\n    │   ├── _rest_managed.json\n    │   ├── schema_extra_fields.xml\n    │   ├── schema_extra_types.xml\n    │   ├── schema.xml\n    │   ├── solrconfig_extra.xml\n    │   ├── solrconfig.xml\n    │   ├── solrcore.properties\n    │   ├── stopwords.txt\n    │   └── synonyms.txt\n    ├── core.properties\n    └── data\n\nMount it as a volume like `-v ./mysearch:/var/solr/mysearch:rw`. If you have multiple solr cores (all defined inside a `cores` directory), mount them inside a `cores` directory like `-v ./cores:/var/solr/cores`.\n\nOr, if using a Docker Compose file:\n\n    services:\n      solr:\n        ...\n        volumes:\n          # If you have one core:\n          - ./mysearch:/var/solr/mysearch:rw\n          # If you have multiple cores:\n          - ./cores:/var/solr/cores:rw\n\nYou can also mount volumes from a data container or elsewhere; the key is you will be able to both provide custom Solr configuration (`schema.xml`, `solrconfig.xml`, etc.), and also have a persistent `data` directory that lives outside the container.\n\n## Management with Ansible\n\n### Prerequisites\n\nBefore using this project to build and maintain a Solr images for Docker, you need to have the following installed:\n\n  - [Docker Community Edition](https://docs.docker.com/engine/installation/) (for Mac, Windows, or Linux)\n  - [Ansible](http://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)\n\n### Build the image\n\nFirst, install Ansible role requirements:\n\n    ansible-galaxy install -r requirements.yml\n\nThen, make sure Docker is running, and run the playbook to build the container:\n\n    ansible-playbook --extra-vars=\"@vars/7.x.yml\" main.yml\n\n(Substitute whatever supported Solr version you desire in the vars path) Once the image is built, you can run `docker images` to see the `solr` image that was generated.\n\n\u003e Note: If you get an error like `Failed to import docker`, run `pip install docker`.\n\n### Push the image to Docker Hub\n\nSee the `.github/workflows/build.yml` file in this repository for how it pushes all the tagged images automatically on any commit to the `master` branch.\n\n## License\n\nMIT / BSD\n\n## Author Information\n\nThis container build was created in 2017 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fsolr-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeerlingguy%2Fsolr-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fsolr-container/lists"}