Building image as rootless in RKE2 with profile cis #5842
luysantana
started this conversation in
General
Replies: 1 comment
-
When started as an unprivileged UID, buildah needs to be able to create a user namespace with unshare(), and set mappings in it with the help of the the newuidmap and newgidmap helpers. It currently can't function otherwise. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I have a RKE2 cluster with profile: cis enabled, that way I've to set the security context in all containers that run in cluster:
I'm using Tekton as CI tool, the pipeline has all tasks configured like this and the only step isn't work is the image build with buildah.
My buildah tekton task is:
This rootless image is based on this doc that I've found in other articles too.
The error I have now is:
2024-11-21T09:45:43.811199551-03:00 [INFO] Executando buildah bud
2024-11-21T09:45:43.839215941-03:00 Error during unshare(CLONE_NEWUSER): Operation not permitted
2024-11-21T09:45:43.839604336-03:00 time="2024-11-21T12:45:43Z" level=error msg="parsing PID "": strconv.Atoi: parsing "": invalid syntax"
2024-11-21T09:45:43.839611999-03:00 time="2024-11-21T12:45:43Z" level=error msg="(Unable to determine exit status)"
But if I put capabilities, I have:
I have tried with overlay and vfs, set and removed runAsUser: 1000, with official buildah image, nothing has working in this cluster and I need to run this cluster with profile: cis enabled.
What can I do?
Beta Was this translation helpful? Give feedback.
All reactions