cancel
Showing results for 
Search instead for 
Did you mean: 
Feliz
Mission Specialist
Mission Specialist
  • 1,433 Views

DO374 - Why podman build instead of ansilbe-builder build

Jump to solution

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'
 
0 Kudos
1 Solution

Accepted Solutions
CliffordW
Mission Specialist
Mission Specialist
  • 1,338 Views

Hi there,

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.

Regards,

Clifford

View solution in original post

2 Replies
CliffordW
Mission Specialist
Mission Specialist
  • 1,339 Views

Hi there,

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.

Regards,

Clifford

Feliz
Mission Specialist
Mission Specialist
  • 1,327 Views

I agree. Ansible-builder will overwrite ContainerFile so any special custom commands in there will be wiped out and there's where "podman build" should be used.

It's just strange that the course is not pointing this out and "ansible-builder build" is not being practiced to actually build the EE and only used to initialize the ContainerFile.

The course should be updated. I'm guessing majority of users out there (who never see the course) will use "ansible-builder build" command.

Join the discussion
You must log in to join this conversation.