diff --git a/Dockerfile b/Dockerfile index b4dd011..b7b241f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,20 +16,21 @@ COPY scripts/docksal-preinit /scripts/docksal-preinit RUN set -xe; \ apt-get update && \ - apt-get -y install sudo; \ + apt-get -y install sudo net-tools; \ echo "solr ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/solr; \ rm -rf /var/lib/apt/lists/* RUN set -xe; \ ln -s /opt/solr/dist /opt/dist; \ ln -s /opt/solr/contrib /opt/contrib; \ - if [[ "$VERSION" =~ "9" ]]; then \ + MAJOR_VERSION=$(echo "${VERSION}" | cut -d. -f1); \ + if [ "${MAJOR_VERSION}" = "9" ]; then \ # Needed for 9.x and above sed -i '/exec "$@"/i . docksal-preinit' /opt/solr/docker/scripts/docker-entrypoint.sh; \ mv /scripts/healthcheck.sh /scripts/docksal-preinit /opt/solr/docker/scripts/; \ chown -R solr:solr /opt/solr/docker /opt/solr/server/solr; \ fi; \ - if [[ "$VERSION" =~ "8" ]]; then \ + if [ "${MAJOR_VERSION}" = "8" ]; then \ # Needed for 8.x and below sed -i '/exec "$@"/i . docksal-preinit' /opt/docker-solr/scripts/docker-entrypoint.sh; \ mv /scripts/healthcheck.sh /scripts/docksal-preinit /opt/docker-solr/scripts/; \ diff --git a/Makefile b/Makefile index 3f8082b..389c602 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ DOCKER ?= docker # See https://docs.docker.com/buildx/working-with-buildx/ DOCKER_BUILDKIT=1 -VERSION ?= 8.1.1 -FROM ?= solr:8.1.1-slim +VERSION ?= 8.11.3 +FROM ?= solr:8.11.3-slim TAG ?= $(VERSION) IMAGE ?= docksal/solr diff --git a/scripts/healthcheck.sh b/scripts/healthcheck.sh index 95fe81e..49a39b9 100755 --- a/scripts/healthcheck.sh +++ b/scripts/healthcheck.sh @@ -1,5 +1,5 @@ #!/usr/bin/env sh -[[ "$(netstat -an | grep LISTEN | grep -E '0.0.0.0:8983.*LISTEN')" == "" ]] && exit 1 +[[ "$(netstat -ant | grep LISTEN | grep -E '*:8983.*LISTEN')" == "" ]] && exit 1 exit 0