Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Remove EOL versions of Redis, fix entrypoint
  • Loading branch information
Telesphoreo committed May 18, 2026
commit 094cbbbdcf05a6a14d4f7815ade0b942eecff858
20 changes: 0 additions & 20 deletions redis/5/Dockerfile

This file was deleted.

20 changes: 0 additions & 20 deletions redis/6/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion redis/8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------
# Environment: redis
# ----------------------------------
FROM --platform=$TARGETOS/$TARGETARCH redis:8-bookworm
FROM --platform=$TARGETOS/$TARGETARCH redis:8-trixie

ENV DEBIAN_FRONTEND=noninteractive

Expand Down
22 changes: 18 additions & 4 deletions redis/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
#!/bin/bash
cd /home/container

# Make internal Docker IP address available to processes.
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP

# Replace Startup Variables
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
echo ":/home/container$ ${MODIFIED_STARTUP}"

# Run the Server
eval ${MODIFIED_STARTUP}
eval ${MODIFIED_STARTUP} &
REDIS_PID=$!

trap 'kill -TERM $REDIS_PID 2>/dev/null; wait $REDIS_PID; exit' TERM INT

for i in $(seq 1 60); do
if /usr/local/bin/redis-cli -p "${SERVER_PORT}" -a "${SERVER_PASSWORD}" --no-auth-warning PING 2>/dev/null | grep -q PONG; then
break
fi
sleep 0.5
done

while IFS= read -r line; do
[ -z "$line" ] && continue
printf '%s\n' "$line" | /usr/local/bin/redis-cli -p "${SERVER_PORT}" -a "${SERVER_PASSWORD}" --no-auth-warning
done

wait $REDIS_PID