Skip to content

Commit

Permalink
Updated checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-e-dietrich committed May 1, 2024
1 parent a23e04e commit eb9c0ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/; \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit eb9c0ea

Please sign in to comment.