Closed TheRealHaoLiu closed 8 months ago
I get why people want builder to do rmi
(though still ill-advised), but why is runner managing images at all? At least under modern podman, just running container instances shouldn't be creating new images.
@nitzmahone I was asking myself the same thing. I think it was added to ansible-runner because that's the only thing other than receptor we install on execution nodes, which is where we need to run this.
My 2 cents - runner is effectively acting as a command allow-list here. If we could ship an arbitrary python file or bash script, it could be done that way, but perhaps, less securely. In the receptor mesh, the control nodes are only allowed to run ansible-runner worker
commands. So we have to go through ansible-runner for anything AWX needs to run.
⚠️ Warning: this PR will cause the behavior to deviate from name of the param
--remove-images
that runs this code ⚠️This is a behavioral change (and hopefully for the better) now cleanup_images will behave the same for podman and docker
docker rmi
will just untag whilepodman rmi
will untag and remove layers and cause runing container to be killed for podman we useuntag
to achieve the same behaviorthis only untag the image and does not delete the image prune_images need to be call to delete