Skip to content

Commit eb9c0ea

Browse files
committedMay 1, 2024··
Updated checks
1 parent a23e04e commit eb9c0ea

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed
 

‎Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@ COPY scripts/docksal-preinit /scripts/docksal-preinit
1616

1717
RUN set -xe; \
1818
apt-get update && \
19-
apt-get -y install sudo; \
19+
apt-get -y install sudo net-tools; \
2020
echo "solr ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/solr; \
2121
rm -rf /var/lib/apt/lists/*
2222

2323
RUN set -xe; \
2424
ln -s /opt/solr/dist /opt/dist; \
2525
ln -s /opt/solr/contrib /opt/contrib; \
26-
if [[ "$VERSION" =~ "9" ]]; then \
26+
MAJOR_VERSION=$(echo "${VERSION}" | cut -d. -f1); \
27+
if [ "${MAJOR_VERSION}" = "9" ]; then \
2728
# Needed for 9.x and above
2829
sed -i '/exec "$@"/i . docksal-preinit' /opt/solr/docker/scripts/docker-entrypoint.sh; \
2930
mv /scripts/healthcheck.sh /scripts/docksal-preinit /opt/solr/docker/scripts/; \
3031
chown -R solr:solr /opt/solr/docker /opt/solr/server/solr; \
3132
fi; \
32-
if [[ "$VERSION" =~ "8" ]]; then \
33+
if [ "${MAJOR_VERSION}" = "8" ]; then \
3334
# Needed for 8.x and below
3435
sed -i '/exec "$@"/i . docksal-preinit' /opt/docker-solr/scripts/docker-entrypoint.sh; \
3536
mv /scripts/healthcheck.sh /scripts/docksal-preinit /opt/docker-solr/scripts/; \

‎Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ DOCKER ?= docker
77
# See https://docs.docker.com/buildx/working-with-buildx/
88
DOCKER_BUILDKIT=1
99

10-
VERSION ?= 8.1.1
11-
FROM ?= solr:8.1.1-slim
10+
VERSION ?= 8.11.3
11+
FROM ?= solr:8.11.3-slim
1212
TAG ?= $(VERSION)
1313

1414
IMAGE ?= docksal/solr

‎scripts/healthcheck.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
22

3-
[[ "$(netstat -an | grep LISTEN | grep -E '0.0.0.0:8983.*LISTEN')" == "" ]] && exit 1
3+
[[ "$(netstat -ant | grep LISTEN | grep -E '*:8983.*LISTEN')" == "" ]] && exit 1
44

55
exit 0

0 commit comments

Comments
 (0)
Please sign in to comment.