How can I run "podman run" commands from inside of an unprivileged pod as a rootless user on OpenShift?
Issue
- We are using our own CI/CD pipeline, such as Jenkins, and wish to run a container within an OpenShift pod in order to build container images.
- Attempting to run rootless containers with
podman runspecifically within a pod on Red Hat OpenShift Container Platform 4 produces errors of various kinds when running, including but not limited to:/usr/bin/slirp4netns failed: \"open(\\\"/dev/net/tun\\\"): No such file or directorError: OCI runtime error: runc: runc create failed: rootless container requires user namespacesError: OCI runtime error: crun: newgidmap: gid range [0-65335) -> [1-65335) not allowedsh: /home/jenkins/@tmp/durable-ffffff/jenkins-log.txt: Permission denied
Environment
- Red Hat OpenShift Container Platform 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.