* [WIP] Unpack local docker images
* unpack local image
* PR feedback + missing new function call
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
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
Optionally add back privileged extraction which can be enabled with
LUET_PRIVILEGED_EXTRACT=true
Signed-off-by: Ettore Di Giacinto <mudler@sabayon.org>
This switches from using the containerd snapshotter to go-containerregistry
library which requires no additional privileges beyond root file system
access.
Signed-off-by: Ettore Di Giacinto <mudler@sabayon.org>
* 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>