Skip to content

Commit

Permalink
Upgrade solr to 9.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelgbanks committed Dec 7, 2023
1 parent 6efb7cd commit d1f22d1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
8 changes: 4 additions & 4 deletions solr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
FROM java

ARG TARGETARCH
ARG SOLR_VERSION="8.11.2"
ARG SOLR_FILE="solr-${SOLR_VERSION}.tgz"
ARG SOLR_URL="https://archive.apache.org/dist/lucene/solr/${SOLR_VERSION}/${SOLR_FILE}"
ARG SOLR_FILE_SHA256="54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6"
ARG SOLR_VERSION=9.4.0
ARG SOLR_FILE=solr-${SOLR_VERSION}.tgz
ARG SOLR_URL=https://archive.apache.org/dist/solr/solr/${SOLR_VERSION}/solr-${SOLR_VERSION}.tgz
ARG SOLR_FILE_SHA256=5ff28fe3a9d92804d53c0072a8459bb1d0c280e212a288a9efd31f923fe1a9d4

EXPOSE 8983

Expand Down
42 changes: 19 additions & 23 deletions solr/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Solr

Docker image for [Solr] version 8.11.2.
Docker image for [solr] version 9.4.0.

Please refer to the [Solr Documentation] for more in-depth information.

As a quick example this will bring up an instance of [Solr], and allow you
As a quick example this will bring up an instance of [solr], and allow you
to view on <http://localhost:8983/solr/>.

```bash
Expand Down Expand Up @@ -42,29 +42,25 @@ additional settings, volumes, ports, etc.

- [Solr Logging]

[Solr Documentation]: https://lucene.apache.org/solr/guide/7_1/
[Solr Logging]: https://lucene.apache.org/solr/guide/7_1/configuring-logging.html
[Solr]: https://lucene.apache.org/solr/

## Changing versions
## Updating

There is 2 values you need to update/change the version.

1. Solr version: found at [archive.apache.org](https://archive.apache.org/dist/lucene/solr)
1. SOLR_FILE_SHA256: sha256sum of the tgz file

```dockerfile
ARG SOLR_VERSION="8.11.2"
ARG SOLR_FILE_SHA256="54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6"
```
You can change the version used for [solr] by modifying the build argument
`SOLR_VERSION` and `SOLR_FILE_SHA256` in the `Dockerfile`.

Go to [archive.apache.org](https://archive.apache.org/dist/lucene/solr) and find the version you want. There will be several files but the one to use have the following naming convention.

* solr-${SOLR_VERSION}.tgz

Download the two files and run and replace the _1.1.1_ with the version you have.
Change `SOLR_VERSION` and then generate the `SOLR_FILE_SHA256` with the following
commands:

```bash
# This outputs the value to use for $SOLR_FILE_SHA256.
sha256sum solr-1.1.1.tgz
SOLR_VERSION=$(cat solr/Dockerfile | grep -o 'SOLR_VERSION=.*' | cut -f2 -d=)
SOLR_FILE=$(cat solr/Dockerfile | grep -o 'SOLR_FILE=.*' | cut -f2 -d=)
SOLR_URL=$(cat solr/Dockerfile | grep -o 'SOLR_URL=.*' | cut -f2 -d=)
SOLR_FILE=$(eval "echo $SOLR_FILE")
SOLR_URL=$(eval "echo $SOLR_URL")
wget --quiet "${SOLR_URL}"
shasum -a 256 "${SOLR_FILE}" | cut -f1 -d' '
rm "${SOLR_FILE}"
```

[Solr Documentation]: https://lucene.apache.org/solr/guide/7_1/
[Solr Logging]: https://lucene.apache.org/solr/guide/7_1/configuring-logging.html
[solr]: https://lucene.apache.org/solr/

0 comments on commit d1f22d1

Please sign in to comment.