summary refs log tree commit diff stats
path: root/tests/docker/dockerfiles/python.docker
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-02-28 19:06:48 +0000
committerAlex Bennée <alex.bennee@linaro.org>2023-03-01 12:45:11 +0000
commit93bd2954f4c47b197233eaff9b165dee52622f27 (patch)
tree063487052dd79b99aa8019d2a6ced2016de7725a /tests/docker/dockerfiles/python.docker
parent5b8bcf6b6cf7a254854e75def40883e2a8fea5dc (diff)
downloadfocaccia-qemu-93bd2954f4c47b197233eaff9b165dee52622f27.tar.gz
focaccia-qemu-93bd2954f4c47b197233eaff9b165dee52622f27.zip
tests/docker: add USER stanzas to non-lci images
These are flat but not generated by lcitool so we need to manually
update them with the `useradd` stanza.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-20-alex.bennee@linaro.org>
Diffstat (limited to 'tests/docker/dockerfiles/python.docker')
-rw-r--r--tests/docker/dockerfiles/python.docker5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/docker/dockerfiles/python.docker b/tests/docker/dockerfiles/python.docker
index 175c10a34e..383ccbdc3a 100644
--- a/tests/docker/dockerfiles/python.docker
+++ b/tests/docker/dockerfiles/python.docker
@@ -15,3 +15,8 @@ ENV PACKAGES \
 
 RUN dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi