Pre-configured Solr Docker image for Open Government Portal.
Docker Image: https://hub.docker.com/r/opendatacanada/solr
Note: These images are not vulnerable to CVE-2021-44228 / Log4J2 as are built on top of patched upstream Solr images.
docker run --name og-solr -p 8983:8983 -d opendatacanada/solr
The following versions are available as different image tags:
Solr version | Docker tag |
---|---|
Solr 8 | opendatacanada/solr |
All these images expose the Solr endpoint at http://localhost:8983/solr/
-
Run a container:
docker run --name og-solr -p 8983:8983 -d opendatacanada/solr
-
Copy the Solr data directory of the target core to your machine:
docker cp og-solr:/var/solr/data ./my_solr_data
-
Stop the container:
docker stop og-solr
-
Run the container with a bind mount:
docker run --name og-solr -p 8983:8983 --mount type=bind,source="$(pwd)"/my_solr_data,target=/var/solr/data -d opendatacanada/solr
Your docker account will need to be part of the organization opendatacanada
-
Log into the docker hub (this is only required once):
docker login
-
Build the image:
docker build ./
-
Run the new docker image with the hash from the end of the previous command output:
docker run -d sha256:<image hash>
-
Get the container ID:
docker ps
-
Commit the build:
docker commit <container ID> opendatacanada/solr
-
Push the build to the docker hub:
docker push opendatacanada/solr