Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equivalent to podman build --pull? #668

Closed
ursetto opened this issue Mar 29, 2024 · 2 comments · Fixed by #677
Closed

Equivalent to podman build --pull? #668

ursetto opened this issue Mar 29, 2024 · 2 comments · Fixed by #677

Comments

@ursetto
Copy link

ursetto commented Mar 29, 2024

podman build has a --pull option that sets pull policy for the base image when building a new image. By default, this is missing.

There appears to be no way to set or override this pull policy in ansible-builder. This means that if you have a base image of tag :latest, it will never be updated by builder after the initial pull.

Is there any way to get ansible-builder to update the base image when it runs? If not, I think a --pull option would be a useful addition to builder. This could be upgraded to --pull-always if container policy requires it, e.g. with signature_required.

I don't want to do a separate podman pull of the image beforehand, because that means I have to repeat the base image name in the schema and in the podman pull.

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Mar 29, 2024
@kurokobo
Copy link
Contributor

As a workaround, you can create context directory including Dockerfile by ansible-builder create command first, then build the context by podman build command with --pull=always.

ansible-builder create --verbosity 3
podman build --tag registry.example.com/ansible/ee:2.15-custom --pull=always context

@Shrews
Copy link
Contributor

Shrews commented May 22, 2024

I've been experimenting with an option to pass extra arguments through to podman build (or docker build) command.

#677

It's mostly there, I just need to find some time to clean it up a bit, but it should give you what you want.

@Shrews Shrews removed the needs_triage New item that needs to be triaged label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants