Github action runners in non-privileged containres in k8s #2703
-
Hi everyone, We are trying to setup environment where all containers are running in non-privileged mode and we would like to run github action runners in this environment and use them to build docker images, has anyone been able to accomplish this? If so I would like to know more about it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hello Pujan, To a degree that's feasible. You can build the images in rootless mode and without any extra priviledge. There are number of options here:
In regards to ARC, there is no so much a solution for that available out of the box I'm afraid. If you choose to run the docker in a side container, it's done in privileged mode by default. You can opt for a rootless, but then again it will be rootless, but still not quite unprivileged. If you choose to restrict yourself to unprivileged mode, you will not be able to create new (linux) namespaces which are essential for creating new containers. Docker In Docker for running containers will simply stop working. I'd love to see some comments from the ARC team to clarify it a bit further as this is indeed a very important subject. |
Beta Was this translation helpful? Give feedback.
Hello Pujan,
this is a holly grail - to be able to build images and run the containers without the escalation of privileges.
To a degree that's feasible. You can build the images in rootless mode and without any extra priviledge. There are number of options here:
..
You can read a nice summary here and also a good explanation on how it can be done with podman and jenkins on OpenShift. These would be good starters to grasp the context.
In regards to ARC, there is no so much a solution for that available out of the box I'm afraid. If you choose to run the docker in a side container, it's done in privileged mode by default. You can opt for a rootless, …