From 5beae0c4dcb3c2bfab0c4c964a11813026ec0ebb Mon Sep 17 00:00:00 2001 From: Shingo Omura Date: Thu, 20 Oct 2022 10:59:51 +0900 Subject: [PATCH 1/2] test/images/agnhost: Adds a test user and group in the image for a E2E test case of SupplementalGroups with pre-defined group in the image --- test/images/agnhost/Dockerfile | 8 ++++++++ test/images/agnhost/VERSION | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/images/agnhost/Dockerfile b/test/images/agnhost/Dockerfile index 8ea15071d1c..ef1c16477bd 100644 --- a/test/images/agnhost/Dockerfile +++ b/test/images/agnhost/Dockerfile @@ -55,5 +55,13 @@ ADD agnhost agnhost # entrypoint is used by the containers. RUN ln -s agnhost agnhost-2 +# this user and group is used in a E2E test case of +# SupplementalGroups with pre-defined group in the image +# - image-user(uid=1000) +# - image-user belongs to group-defined-in-image(gid=50000) +RUN adduser -u 1000 -D image-user && \ + addgroup -g 50000 group-defined-in-image && \ + addgroup image-user group-defined-in-image + ENTRYPOINT ["/agnhost"] CMD ["pause"] diff --git a/test/images/agnhost/VERSION b/test/images/agnhost/VERSION index 2a43146444b..7cd20263835 100644 --- a/test/images/agnhost/VERSION +++ b/test/images/agnhost/VERSION @@ -1 +1 @@ -2.42 +2.43 From d59af27d69ee793aee60c808d55c9c74acc76315 Mon Sep 17 00:00:00 2001 From: Shingo Omura Date: Fri, 21 Oct 2022 10:18:30 +0900 Subject: [PATCH 2/2] change the username in the image that is aligned with the group name --- test/images/agnhost/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/images/agnhost/Dockerfile b/test/images/agnhost/Dockerfile index ef1c16477bd..6d0bbe04d81 100644 --- a/test/images/agnhost/Dockerfile +++ b/test/images/agnhost/Dockerfile @@ -57,11 +57,11 @@ RUN ln -s agnhost agnhost-2 # this user and group is used in a E2E test case of # SupplementalGroups with pre-defined group in the image -# - image-user(uid=1000) -# - image-user belongs to group-defined-in-image(gid=50000) -RUN adduser -u 1000 -D image-user && \ +# - user-defined-in-image(uid=1000) +# - user-defined-in-image belongs to group-defined-in-image(gid=50000) +RUN adduser -u 1000 -D user-defined-in-image && \ addgroup -g 50000 group-defined-in-image && \ - addgroup image-user group-defined-in-image + addgroup user-defined-in-image group-defined-in-image ENTRYPOINT ["/agnhost"] CMD ["pause"]