Context
In tmt/steps/provision/__init__.py:
full_script = ShellScript.from_scripts(script_parts)
# Add to the package manager's engine
self.package_manager.engine.open_containerfile_directives()
The open_containerfile_directives() method should be refactored to be a context manager for better resource handling.
Original discussion
#4525 (comment)