| Docker Images for Solr |
| ====================== |
| |
| Solr docker images are built using Palantir's Docker Gradle plugin, https://github.com/palantir/gradle-docker. |
| |
| Common Inputs |
| ------------- |
| |
| The docker image and its tag can be customized via the following options, all accepted via both Environment Variables and Gradle Properties. |
| |
| Docker Image Repository: |
| Default: "apache/solr" |
| EnvVar: SOLR_DOCKER_IMAGE_REPO |
| Gradle Property: -Psolr.docker.imageRepo |
| |
| Docker Image Tag: |
| Default: the Solr version, e.g. "9.0.0-SNAPSHOT" |
| EnvVar: SOLR_DOCKER_IMAGE_TAG |
| Gradle Property: -Psolr.docker.imageTag |
| |
| Docker Image Name: (Use this to explicitly set a whole image name. If given, the image repo and image version options above are ignored.) |
| Default: {image_repo}/{image_tag} (both options provided above, with defaults) |
| EnvVar: SOLR_DOCKER_IMAGE_NAME |
| Gradle Property: -Psolr.docker.imageName |
| |
| Building |
| -------- |
| |
| In order to build the Solr Docker image, run: |
| |
| gradlew docker |
| |
| The docker build task accepts the following inputs, in addition to the common inputs listed above: |
| |
| Base Docker Image: (The docker image used for the "FROM" in the Solr Dockerfile) |
| Default: "openjdk:11-jre-slim" |
| EnvVar: SOLR_DOCKER_BASE_IMAGE |
| Gradle Property: -Psolr.docker.baseImage |
| |
| Github URL or Mirror: (The URL of github or a mirror of github releases. This is of use when building the docker image behind a firewall that does not have access to external Github.) |
| Default: "github.com" |
| EnvVar: SOLR_DOCKER_GITHUB_URL |
| Gradle Property: -Psolr.docker.githubUrl |
| |
| Testing |
| ------- |
| |
| To test the docker image, run: |
| |
| gradlew dockerTest |
| |
| If a custom docker image name was used, via one of the common inputs described above, then the same input must be used while testing. |
| |
| You can also specify an explicit list of tests to run, or an explicit list of tests to ignore. |
| Both inputs are optional, and by default all tests will be run. |
| |
| gradlew testDocker --tests create_core,demo |
| gradlew testDocker --ignore demo-tini,initdb |