-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
To resolve the redis:7.2-alpine
vulnerabilities I've build my own docker image for redis based on ubuntu:noble
.
FROM ubuntu:noble
# List linux version
RUN cat /etc/issue
USER root
RUN echo "Installing Debian dependencies..." \
# `apt-get update` caused error `W: GPG error: http://security.debian.org/debian-security stretch/updates InRelease: At least one invalid signature was encountered.` fix: https://github.com/debuerreotype/docker-debian-artifacts/issues/69#issuecomment-603864015
export DEBIAN_FRONTEND="noninteractive" && \
# `Error debconf: unable to initialize frontend: Redline` error. Fix: https://github.com/moby/moby/issues/27988#issuecomment-462809153
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && apt-get upgrade -y && \
apt-get install --no-install-recommends --no-install-suggests -y \
redis-server
# Create K8s run groups
ARG USER=default-docker
RUN groupadd --gid 2000 runAsGroup \
&& groupadd --gid 3000 fsGroup \
&& useradd --uid 1001 --gid 3000 --system --home /home --shell /bin/bash -c "Default Dockerfile User" $USER \
&& usermod -a -G runAsGroup $USER
# Add 1001 to the 'redis' group.
RUN usermod -a -G redis $USER
The issue is the startup logs. On the redis:7.2-alpine
image the startup logs are:
redis-1 | 1:M 18 Apr 2024 15:32:17.010 * Ready to accept connections tcp
On my custom ubuntu:noble
image the startup logs are:
redis-1 | 7:M 18 Apr 2024 15:29:58.187 * Ready to accept connections
You can see the problem in the regex here: AbstractRedisContainer.java#L21 .*Ready to accept connections.*\\n
requires 1 or more characters between the work connections
and the \n
character.
Suggested Solution:
- Allow users to configure the readiness check
- Change the regex to
.*Ready to accept connections(.*)?\\n
- Combination of both?
Let me know what you prefer and I can contribute a fix.
Metadata
Metadata
Assignees
Labels
No labels