Skip to content

Commit

Permalink
Fix Dockerfile for CentOS Stream 10
Browse files Browse the repository at this point in the history
Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Aug 16, 2024
1 parent aff8baa commit 8d169d0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions 7/Dockerfile.c10s
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ LABEL summary="$SUMMARY" \

EXPOSE 6379

# Get prefix path and path to scripts rather than hard-code them in scripts
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/valkey \
VALKEY_PREFIX=/usr \
VALKEY_CONF=/etc/valkey/valkey.conf \
VALKEY_SOCK=/run/valkey/valkey.sock \
VALKEY_LIB=/var/lib/valkey \
VALKEY_RUN=/run/valkey


# Create user for Valkey that has known UID
# We need to do this before installing the RPMs which would create user with random UID
# The UID is the one used by the default user from the parent layer (1001),
Expand All @@ -51,8 +60,10 @@ RUN getent group valkey &> /dev/null || groupadd -r valkey &> /dev/null && \
rpm -V $INSTALL_PKGS && \
dnf -y clean all --enablerepo='*' && \
valkey-server --version | grep -qe "^Server v=$VALKEY_VERSION\." && echo "Found VERSION $VALKEY_VERSION" && \
mkdir -p /var/lib/valkey/data && chown -R valkey.0 /var/lib/valkey && \
mkdir -p /var/run/valkey && chown -R valkey.0 /var/run/valkey && \
mkdir -p $VALKEY_LIB/data && chown -R valkey:0 $VALKEY_LIB && \
mkdir -p $VALKEY_RUN && chown -R valkey:0 $VALKEY_RUN && \
chmod -R ug+rwX $VALKEY_RUN && \
chmod -R ug+rwX $VALKEY_LIB && \
[[ "$(id valkey)" == "uid=1001(valkey)"* ]]

# Get prefix path and path to scripts rather than hard-code them in scripts
Expand Down

0 comments on commit 8d169d0

Please sign in to comment.