[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 10/28] tests/docker: allow non-unique userid
From: |
Alex Bennée |
Subject: |
[PATCH v1 10/28] tests/docker: allow non-unique userid |
Date: |
Tue, 26 Oct 2021 11:22:16 +0100 |
This is a bit of a band-aid against hand-built images that have been
accidentally polluted by a user build. All images pulled from the
registry shouldn't have the user defined.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/docker/docker.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 78dd13171e..5eadf0bb7b 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -336,7 +336,7 @@ def build_image(self, tag, docker_dir, dockerfile,
uid = os.getuid()
uname = getpwuid(uid).pw_name
tmp_df.write("\n")
- tmp_df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" %
+ tmp_df.write("RUN id %s 2>/dev/null || useradd -o -u %d -U %s" %
(uname, uid, uname))
tmp_df.write("\n")
@@ -590,7 +590,7 @@ def run(self, args, argv):
uid = os.getuid()
uname = getpwuid(uid).pw_name
df.write("\n")
- df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" %
+ df.write("RUN id %s 2>/dev/null || useradd -o -u %d -U %s" %
(uname, uid, uname))
df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8"))
--
2.30.2
- [PATCH v1 00/28] testing, plugins and gdbstub for 6.2, Alex Bennée, 2021/10/26
- [PATCH v1 04/28] gitlab-ci: Remove special casing for hexagon testing, Alex Bennée, 2021/10/26
- [PATCH v1 01/28] tests/docker: Use apt build-dep in debian10, Alex Bennée, 2021/10/26
- [PATCH v1 02/28] tests/docker: Simplify debian-all-test-cross, Alex Bennée, 2021/10/26
- [PATCH v1 11/28] tests/tcg: enable debian-nios2-cross for test building, Alex Bennée, 2021/10/26
- [PATCH v1 10/28] tests/docker: allow non-unique userid,
Alex Bennée <=
- [PATCH v1 07/28] tests/tcg: Enable container_cross_cc for microblaze, Alex Bennée, 2021/10/26
- [PATCH v1 06/28] tests/docker: Add debian-microblaze-cross image, Alex Bennée, 2021/10/26
- [PATCH v1 05/28] tests/docker: Add debian-nios2-cross image, Alex Bennée, 2021/10/26
- [PATCH v1 03/28] tests/docker: Update debian-hexagon-cross to a newer toolchain, Alex Bennée, 2021/10/26