0

I have a Jenkins running as a podman container, now I want to build a image using pipeline, but Jenkins container always tells these files were not found.

Jenkins_Buildah Error

Here is how I run my Jenkins image:

podman run -u root -d -v jenkins_home:/var/jenkins_home -v $(which buildah):/usr/bin/buildah -p 8085:8080 -p 50000:50000 --name jenkins_buildah jenkins/jenkins:lts

datta ambareesh
  • 141
  • 1
  • 8
  • Buildah seems to be linked against `libgpgme`, but it is not present in the image. Try to find the package which contains this library and install it. Kinda strange that it does not come as `buildah` dependency during the installation. – Danila Kiver Sep 24 '20 at 09:26
  • Ah, I see, you mount `buildah` binary from the host. That's a bad idea (exactly because of what you are seeing now). Install `buildah` into the image instead. – Danila Kiver Sep 24 '20 at 09:27
  • Can you please explain in brief on how to do that because I am new to these concepts. – datta ambareesh Sep 24 '20 at 09:53
  • Probably it would be better to start with the documentation and learn how to build custom images, as this topic is too huge to explain in comments from scratch. Given that you use `buildah bud` (i.e. build using Dockerfiles), I would suggest starting with Docker reference and then, if required, continue with Podman documentation. – Danila Kiver Sep 24 '20 at 10:19
  • In general - you have to write your own Dockerfile with Jenkins image as a base image and install `buildah` using `RUN` clauses. After this you will have to run Jenkins using this image and will not need to mount `buildah` into the container. – Danila Kiver Sep 24 '20 at 10:21
  • Thank you.You mean to say that I need to take Jenkins as a base image, install buildah into that and I need to build the image by using my own Dockerfile using buildah bud command.Is that what I need to do? – datta ambareesh Sep 24 '20 at 10:30
  • Yep, you got it right. – Danila Kiver Sep 24 '20 at 11:44

0 Answers0