Dockerfile: Use original UID/GID when run without kas-container

Since 492b2c56, we create user and group upfront, now using 1000:1000 as
IDs. This can cause unexpected glitches when using the container without
kas-container in environments where older version already created files
with the previously used IDs. In order to stay compatible, switch the
default IDs back to 30000:30000.

This will not affect any user of kas-container.

Reported-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2023-02-27 16:26:00 +01:00
parent 06fad464b5
commit 258acbead6

View File

@ -54,7 +54,8 @@ RUN echo "builder ALL=NOPASSWD: ALL" > /etc/sudoers.d/builder-nopasswd && \
RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy\"" \
> /etc/sudoers.d/env_keep && chmod 660 /etc/sudoers.d/env_keep
RUN useradd builder --user-group --create-home --home-dir /builder
RUN groupadd builder -g 30000 && \
useradd builder -u 30000 -g 30000 --create-home --home-dir /builder
ENTRYPOINT ["/kas/container-entrypoint"]