laforge submitted this change.
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
---
M release-tarball-build-dist/Dockerfile
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/release-tarball-build-dist/Dockerfile b/release-tarball-build-dist/Dockerfile
index 678efd4..dcfea51 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 @@
xsltproc \
&& \
apt-get clean
+
+RUN useradd --uid=${UID} -m user
+USER user
To view, visit change 30389. To unsubscribe, or for help writing mail filters, visit settings.