This commit is multi-fold as it also refactors internally context and logger
as interfaces so it is easier to plug luet as a library externally.
Introduces a garbage collector (related to #227) but doesn't handle yet
parallelism.
Closes#265
Add api call which uses go-container registry to create OCI images from
standard tar archives.
Consume new API when generating final images instead of docker building them
and adapts/add tests as necessary.
This change now allows to carry over xattrs to final images.
Fixes#266
It holds necessary state plus additional information relative to the
context which we are being run to (e.g. if we are in a terminal or not).
Besides in the future we can use it also as a contextual logger to
provide more smart logging capabilities.
This also replace the general global configuration instance that
previously was share between the core components.
* Reduce possibility of circular dependency
Just by adding an import for bus to anything in the helper dir, we would
run into a circular dependency due to how things are structured. That
means that we cannot set any events for unpacking or docker helper
pulling an image.
This commit tries to work around this by doing several things.
- Remove full imports of the helper module by segmentating some modules
into their own submodule, like docker or match so just using a small match
function doesnt bring the whole module
- Removing a simple function to check if a dir exists from importing
the full helper module and instead write the function (5 lines)
- Using logrus in the bus module instead of logger, which avoids a
circular dependency
Signed-off-by: Itxaka <igarcia@suse.com>
* Add two new events for unpacking an image
Both pre and post unpacking an image
Signed-off-by: Itxaka <igarcia@suse.com>
The realtime output could be configured through
LUET_GENERAL__SHOW_BUILD_OUTPUT environment
variable or related config option or through
`--live-output` option.
The backend will figure out if we have the image or not, otherwise will
atempt to pull if not there.
Skip retrieve integration test with img as its not supported.
This changeset also drops --keep-exported-images, which is quite unused
and can be replaced with a plugin, or either by manually exporting the
resulting images.
Is it more faster in this way as we already have all the needed folders
to the comparison extracted. In this way we don't repeat I/O operation
twice by calling container-diff.
Do not depend on container-diff anymore