From 193feff80f5895ee50e79e36467d5bde2931b63f Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 30 Nov 2022 17:14:37 +0100 Subject: [PATCH] release-tarball-build-dist: fix permission errors Run all commands inside the docker containers as a user with the same UID as on the host system, not as root. This is a good idea in general and also fixes permission problems when jenkins tries to wipe the workspace. Related: OS#5793 Change-Id: I0d949e5ab4b1a709d18a316def0a98c3b244457e --- release-tarball-build-dist/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release-tarball-build-dist/Dockerfile b/release-tarball-build-dist/Dockerfile index 678efd4d..dcfea51f 100644 --- a/release-tarball-build-dist/Dockerfile +++ b/release-tarball-build-dist/Dockerfile @@ -1,6 +1,7 @@ ARG USER FROM $USER/debian-bullseye-obs-latest # Arguments used after FROM must be specified again +ARG UID RUN apt-get update && \ apt-get install -y --no-install-recommends \ @@ -71,3 +72,6 @@ RUN apt-get update && \ xsltproc \ && \ apt-get clean + +RUN useradd --uid=${UID} -m user +USER user