You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I think I'm facing some issue in the latest releases. My issue is with groups command.
When I run the groups command in a Dockerfile I get the error:
groups: cannot find name for group ID XYZ
Let's use the following Dockerfile to see the behavior:
FROM ubuntu
RUN groupadd -g 1234 group123
RUN useradd -u 54321 -g 1234 user123
USER user123
RUN groups
Actual behavior
In the releases 1.9.0 (8cab37f84a44) and 1.9.1 (dcfa90c317b5) this is the output when I run the executor command with the previous Dockerfile:
/workspace # executor --dockerfile "Dockerfile" --no-push
INFO[0000] Retrieving image manifest ubuntu
INFO[0000] Retrieving image ubuntu from registry index.docker.io
INFO[0001] Built cross stage deps: map[]
INFO[0001] Retrieving image manifest ubuntu
INFO[0001] Returning cached image manifest
INFO[0001] Executing 0 build triggers
INFO[0001] Building stage 'ubuntu' [idx: '0', base-idx: '-1']
INFO[0001] Unpacking rootfs as cmd RUN groupadd -g 1234 group123 requires it.
INFO[0002] RUN groupadd -g 1234 group123
INFO[0002] Initializing snapshotter ...
INFO[0002] Taking snapshot of full filesystem...
INFO[0003] Cmd: /bin/sh
INFO[0003] Args: [-c groupadd -g 1234 group123]
INFO[0003] Running: [/bin/sh -c groupadd -g 1234 group123]
INFO[0003] Taking snapshot of full filesystem...
INFO[0003] RUN useradd -u 54321 -g 1234 user123
INFO[0003] Cmd: /bin/sh
INFO[0003] Args: [-c useradd -u 54321 -g 1234 user123]
INFO[0003] Running: [/bin/sh -c useradd -u 54321 -g 1234 user123]
INFO[0003] Taking snapshot of full filesystem...
INFO[0003] USER user123
INFO[0003] Cmd: USER
INFO[0003] RUN groups
INFO[0003] Cmd: /bin/sh
INFO[0003] Args: [-c groups]
INFO[0003] Util.Lookup returned: &{Uid:54321 Gid:1234 Username:user123 Name: HomeDir:/home/user123}
INFO[0003] Performing slow lookup of group ids for user123
INFO[0003] Running: [/bin/sh -c groups]
groups: cannot find name for group ID 54321
54321 group123
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
Expected behavior
In the releases 1.8.1 (e1e8f684a8d2) and the previous ones, the behavior is the following:
/workspace # executor --dockerfile "Dockerfile" --no-push
INFO[0000] Retrieving image manifest ubuntu
INFO[0000] Retrieving image ubuntu from registry index.docker.io
INFO[0001] Built cross stage deps: map[]
INFO[0001] Retrieving image manifest ubuntu
INFO[0001] Returning cached image manifest
INFO[0001] Executing 0 build triggers
INFO[0001] Unpacking rootfs as cmd RUN groupadd -g 1234 group123 requires it.
INFO[0002] RUN groupadd -g 1234 group123
INFO[0002] Taking snapshot of full filesystem...
INFO[0003] cmd: /bin/sh
INFO[0003] args: [-c groupadd -g 1234 group123]
INFO[0003] Running: [/bin/sh -c groupadd -g 1234 group123]
INFO[0003] Taking snapshot of full filesystem...
INFO[0003] RUN useradd -u 54321 -g 1234 user123
INFO[0003] cmd: /bin/sh
INFO[0003] args: [-c useradd -u 54321 -g 1234 user123]
INFO[0003] Running: [/bin/sh -c useradd -u 54321 -g 1234 user123]
INFO[0003] Taking snapshot of full filesystem...
INFO[0003] USER user123
INFO[0003] cmd: USER
INFO[0003] RUN groups
INFO[0003] cmd: /bin/sh
INFO[0003] args: [-c groups]
INFO[0003] util.Lookup returned: &{Uid:54321 Gid:1234 Username:user123 Name: HomeDir:/home/user123}
INFO[0003] performing slow lookup of group ids for user123
INFO[0003] Running: [/bin/sh -c groups]
group123
INFO[0003] Taking snapshot of full filesystem...
INFO[0003] No files were changed, appending empty layer to config. No layer added to image.
INFO[0003] Skipping push to container registry due to --no-push flag
Additional Information
I have done some testing and I would say the issue is in the commit: aad03dc
I built Kaniko images locally without that commit (aad03dc) and it seems it worked fine. That's why I think there is an issue in the mentioned commit.
The text was updated successfully, but these errors were encountered:
It looks like Kaniko thinks by default that the UID (54321 in the example) is also a GID.
So when it tries to resolve the GIDs it cannot find 54321 because indeed it is not a GID.
Hi, I think I'm facing some issue in the latest releases. My issue is with
groups
command.When I run the
groups
command in a Dockerfile I get the error:Let's use the following
Dockerfile
to see the behavior:Actual behavior
In the releases
1.9.0 (8cab37f84a44)
and1.9.1 (dcfa90c317b5)
this is the output when I run theexecutor
command with the previousDockerfile
:Expected behavior
In the releases
1.8.1 (e1e8f684a8d2)
and the previous ones, the behavior is the following:Additional Information
I have done some testing and I would say the issue is in the commit: aad03dc
I built Kaniko images locally without that commit (aad03dc) and it seems it worked fine. That's why I think there is an issue in the mentioned commit.
The text was updated successfully, but these errors were encountered: