Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions debian/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions debian/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ RUN set -eux; \
g++ \
libc6-dev \
libssl-dev \
libsystemd-dev \
pkg-config \
make; \
\
arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
Expand Down
14 changes: 14 additions & 0 deletions test/run-entrypoint-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -705,5 +705,19 @@ test_redis_server_modules_are_loaded() {
run_redis_docker_and_check_modules /usr/local/bin/redis-server
}

# If the base image ships libsystemd, redis-server must be built against it so
# that it can talk to systemd (sd_notify). On images without libsystemd (e.g.
# Alpine) the binary is built without systemd support, so the test is skipped.
test_redis_server_is_linked_against_libsystemd() {
if ! docker run --rm --entrypoint sh "$REDIS_IMG" -c 'find /lib /usr/lib -name "libsystemd.so*" 2>/dev/null | grep -q .'; then
echo "Skipping: libsystemd is not present in the base image"
startSkipping
return 0
fi

linked=$(docker run --rm --entrypoint sh "$REDIS_IMG" -c 'ldd "$(command -v redis-server)"')
assertContains "redis-server should be linked against libsystemd" "$linked" "libsystemd.so"
Comment thread
Peter-Sh marked this conversation as resolved.
}

# shellcheck disable=SC1091
. ./shunit2
Loading