Sample Header Ad - 728x90

How can I test that a buildah script is run under buildah-unshare?

0 votes
2 answers
348 views
If I have a script that uses buildah mount. I use the same way the docs specify, mnt=$(buildah mount $ctr) If I invoke my script sh ./build.sh, I get > cannot mount using driver overlay in rootless mode. You need to run it in a buildah unshare session The problem is that the script doesn't terminate in the event of failure here. I can check it out by testing for if [-z $mnt]; then echo "Run with buildah-unshare; exit; fi, but this is not ideal because then I still have the prior buildah from that I'm doing for nothing. If you're trying to support rootless buildah, is there a way to ensure that you're running the buildah under buildah unshare?
Asked by Evan Carroll (34663 rep)
Nov 14, 2020, 10:57 PM
Last activity: Nov 16, 2020, 02:34 PM