containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.84k stars 2.42k forks source link

Is it possible to build and run a container image (that will run another container inside it) in the Jenkins job that is hosted on the openshift cluster? #10440

Closed pratikjagrut closed 3 years ago

pratikjagrut commented 3 years ago

I'm trying the $ISSUE_TITLE scenario and currently, I'm seeing some errors.

+ podman build --no-cache -f Dockerfile.tests --build-arg ACCEPTANCE_TESTS_URL=https://github.com/redhat-developer/helm-acceptance-testing --build-arg ACCEPTANCE_TESTS_COMMIT=helm-3.2-openshift -t helm-acceptacne-test /home/jenkins/workspace/helm-cpaas-run-acceptance-test
STEP 1: FROM registry.access.redhat.com/ubi8/ubi:8.2
Getting image source signatures
Copying blob sha256:c4d668e229cd131e0a8e4f8218dca628d9cf9697572875e355fe4b247b6aa9f0
Copying blob sha256:ec1681b6a383e4ecedbeddd5abc596f3de835aed6db39a735f62395c8edbff30
Copying config sha256:ecbc6f53bba0d1923ca9e92b3f747da8353a070fccbae93625bd8b47dbee772e
Writing manifest to image destination
Storing signatures
time="2021-05-24T07:47:30Z" level=error msg="unable to write build event: \"write unixgram @021cf->/run/systemd/journal/socket: sendmsg: no such file or directory\""
Error: error creating build container: Error committing the finished image: error adding layer with blob "sha256:ec1681b6a383e4ecedbeddd5abc596f3de835aed6db39a735f62395c8edbff30": Error processing tar file(exit status 1): there might not be enough IDs available in the namespace (requested 0:12 for /var/spool/mail): lchown /var/spool/mail: invalid argument

I tried few commands suggested in various issues

+ podman unshare cat /proc/self/uid_map
time="2021-05-24T07:47:18Z" level=error msg="cannot find UID/GID for user 1006860000: No subuid ranges found for user \"1006860000\" in /etc/subuid - check rootless mode in man pages."
time="2021-05-24T07:47:18Z" level=error msg="unable to write system event: \"write unixgram @021c9->/run/systemd/journal/socket: sendmsg: no such file or directory\""
         0 1006860000          1
+ podman system migrate
+ podman unshare cat /proc/self/uid_map
time="2021-05-24T07:47:18Z" level=error msg="cannot find UID/GID for user 1006860000: No subuid ranges found for user \"1006860000\" in /etc/subuid - check rootless mode in man pages."
         0 1006860000          1

Is $ISSUE_TITLE even possible? If yes then could someone give me any pointers?

mheon commented 3 years ago

@rhatdan @umohnani8 Another Podman-in-container issue for you folks

rhatdan commented 3 years ago

We have just published

https://www.redhat.com/sysadmin/podman-inside-container And https://www.redhat.com/sysadmin/podman-inside-kubernetes

Please read these and see if they help solve your problem. Reopen if you need more information.