From 7a882afa495f6d361162c8b917fa599fc4033fc4 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 17 May 2024 18:26:36 +1000 Subject: [PATCH] ubi: fix uid/gid to 999 This facilitates and upgrade from mysql container where that is the uid used. --- Dockerfile-ubi.template | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile-ubi.template b/Dockerfile-ubi.template index e6c12ed..930a8a2 100644 --- a/Dockerfile-ubi.template +++ b/Dockerfile-ubi.template @@ -1,6 +1,10 @@ FROM redhat/ubi9 -RUN groupadd -r mysql && useradd -r -g mysql mysql +# systemd-coredump has the uid 999, input has group 999, that we want to use for compatibility with the ubuntu image. +RUN groupdel input && \ + userdel systemd-coredump && \ + groupadd --gid 999 -r mysql && \ + useradd -r -g mysql mysql --home-dir /var/lib/mysql --uid 999 ARG TARGETARCH ENV GOSU_VERSION 1.17