Skip to content

Commit

Permalink
Solr 8.11.2 update (#244)
Browse files Browse the repository at this point in the history
* Update Dockerfile

* Add info for switch Solr versions

* Add new line after header

* Switching out ENV for ARG

* Switching out ENV for ARG

* Add a newline

* Remove "Solr keys" ref

* Solr 8.11.2 requires GNU ps to start correctly.

Co-authored-by: Nigel Banks <[email protected]>
  • Loading branch information
DonRichards and nigelgbanks authored Nov 3, 2022
1 parent 4be2994 commit 219677c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
10 changes: 8 additions & 2 deletions solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download

ARG SOLR_VERSION="7.1.0"
ARG SOLR_FILE_SHA256="5cd25cc2634e47efbb529658d6ddd406a7cd1b211affa26563a28db2d80b8133"
ARG SOLR_VERSION="8.11.2"
ARG SOLR_FILE_SHA256="54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6"

RUN --mount=type=cache,id=solr-downloads,sharing=locked,target=/opt/downloads \
SOLR_FILE="solr-${SOLR_VERSION}.tgz" && \
Expand All @@ -15,6 +16,7 @@ RUN --mount=type=cache,id=solr-downloads,sharing=locked,target=/opt/downloads \
--file "${DOWNLOAD_CACHE_DIRECTORY}/${SOLR_FILE}" \
docs example licenses server/solr/configsets

FROM alpine:${alpine} AS cache
FROM ${repository}/java:${tag}

EXPOSE 8983
Expand All @@ -31,6 +33,10 @@ COPY --from=download /etc/passwd /etc/passwd
COPY --from=download /etc/shadow /etc/shadow
COPY --from=download --chown=solr:solr /opt/solr /opt/solr

# Solr requires GNU ps.
RUN --mount=type=cache,id=solr-apk,sharing=locked,from=cache,target=/var/cache/apk \
apk add procps

COPY rootfs /

WORKDIR /opt/solr
25 changes: 24 additions & 1 deletion solr/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Solr

Docker image for [Solr] version 7.1.0.
Docker image for [Solr] version 8.11.2.

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

Expand Down Expand Up @@ -45,3 +45,26 @@ additional settings, volumes, ports, etc.
[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

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"
```

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.

```bash
# This outputs the value to use for $SOLR_FILE_SHA256.
sha256sum solr-1.1.1.tgz
```

0 comments on commit 219677c

Please sign in to comment.