Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-1400

DO374-77: Why use podman build instead of ansible-builder build?

XMLWordPrintable

    • ILT, ROLE, VT
    • en-US (English)

      URL:
      Reporter RHNID:
      Section: -
      Language: en-US (English)
      Workaround:

      Description: (Filed for "Felix" at https://learn.redhat.com/t5/Automation-Management-Ansible/DO374-Why-podman-build-instead-of-ansilbe-builder-build/m-p/25903#M708)

      On DO374 (Developing Advanced Automation with AAP 2.0), there's a practice of modifying Containerfile to perform some commands e.g. inserting cert file to the image. Then it asks us to build the EE using podman build.

      I find this strange, as ansible-builder build command is the better way. We don't have to edit Containerfile as well. We can just use below on the EE spec file.

      additional_build_steps:
        prepend:
          - RUN echo 'First do something here'
        append:
          - RUN echo 'Then do something else here'

       

      (Further feedback marked as "Solution" from "CliffordW")

      I totally agree that doing this in the execution-environment.yml file makes more sense. I guessing there might be cases where custom changes to Containerfile might be required, though.

      I read that part of the course as just pointing out that running "ansible-builder build" overwrites any changes to Containerfile, so if you make changes there, you need to use "podman build" instead.

       
      (We might want to make this point more clear.)

       

              glsbugs-automation@redhat.com PTL - Ansible Team
              rht-sbonnevi Steven Bonneville
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: