You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by tw...@apache.org on 2025/08/24 05:41:15 UTC

(kvrocks) branch unstable updated: feat(Dockerfile): add a UID for the user in the container (#3138)

This is an automated email from the ASF dual-hosted git repository.

twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 798a3db4a feat(Dockerfile): add a UID for the user in the container (#3138)
798a3db4a is described below

commit 798a3db4ac5eb32bfd08291f044f9f293b5a2303
Author: Roman Donchenko <rd...@outlook.com>
AuthorDate: Sun Aug 24 08:41:11 2025 +0300

    feat(Dockerfile): add a UID for the user in the container (#3138)
    
    Also, use hardcoded IDs when creating the user and group, to ensure they
    remain stable.
    
    Closes #3135.
    
    Co-authored-by: Aleks Lozovyuk <al...@gmail.com>
---
 Dockerfile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index d6353b489..f5cdf74ce 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -31,13 +31,13 @@ FROM debian:bookworm-slim
 RUN DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade -y && apt-get -y install openssl ca-certificates redis-tools binutils && apt-get clean
 
 # Create a dedicated non-root user and group
-RUN groupadd -r kvrocks && useradd -r -g kvrocks kvrocks
+RUN groupadd --gid=999 -r kvrocks && useradd --uid=999 -r -g kvrocks kvrocks
 
 RUN mkdir /var/run/kvrocks /var/lib/kvrocks && \
     chown -R kvrocks:kvrocks /var/run/kvrocks /var/lib/kvrocks
 
 # Switch to the non-root user
-USER kvrocks
+USER 999
 
 VOLUME /var/lib/kvrocks