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

Investigate using an in-code implementation for copying binary files #22

Open
jdob opened this issue Oct 26, 2023 · 1 comment
Open
Labels
technical debt Implmentation shortcuts we did for time but need to be revisited in the future triaged The team has reviewed the issue

Comments

@jdob
Copy link
Contributor

jdob commented Oct 26, 2023

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.

@atanasdinov
Copy link
Contributor

#28 introduced the functionality to copy files from a source to destination directory.

We should investigate whether the performance and behaviour of this are suitable for copying the larger raw image files.

@jdob jdob added the technical debt Implmentation shortcuts we did for time but need to be revisited in the future label Dec 7, 2023
@jdob jdob added the triaged The team has reviewed the issue label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Implmentation shortcuts we did for time but need to be revisited in the future triaged The team has reviewed the issue
Projects
None yet
Development

No branches or pull requests

2 participants