Investigate using an in-code implementation for copying binary files #22
Labels
technical debt
Implmentation shortcuts we did for time but need to be revisited in the future
triaged
The team has reviewed the issue
As part of the raw image creation, the base image is first copied to the output location. All modifications are then done to the copy, leaving the base image pristine.
The current implementation (as of #18) is to shell out to
cp
. The rationale at the time is that we're already shelling out for other commands (xorriso, guestfish) and since we control the container image, we know cp will exist.However, it might be cleaner to do this copy in code, using something like https://pkg.go.dev/io#Copy. We need to look into an implementation using this approach and make sure it scales sufficiently for larger binaries (such as the raw image).
It should be noted that this isn't just for raw images. As we add image customization capabilities to EIB, we'll have a need to copy other binaries into the combustion directory (such as RPMs or the RKE2 installer binaries). Ideally, this issue will result in a reusable
copyFileToCombustionDir
type of method.The text was updated successfully, but these errors were encountered: