Adding container-storage as a provider for daemonless Podman and Buildah Support - #635
Adding container-storage as a provider for daemonless Podman and Buildah Support#635Bru456 wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
This is pulling in github.com/containers/storage , however, this has recently migrated to podman-container-tools/container-libs.
Additionally, the use of replace directives will most likely block this from being merged as it will complicate / add friction to consumers of stereoscope (e.g. syft and grype and all lib consumers of those projects too).
There was a problem hiding this comment.
Thanks, @wagoodman I will look into this. The replace was only needed for Linux builds and was needed to get the containers storage to compile. I will see if the new lib sorts the need for replaces. :)
…rage such as on podman and buildah. This is to implement issue anchore#197 Signed-off-by: Bruce Clark <bruce.clark@mandg.com>
Signed-off-by: Bruce Clark <bruce.clark@mandg.com>
…lity Signed-off-by: Bruce Clark <bruce.clark@mandg.com>
Signed-off-by: Bruce Clark <bruce.clark@mandg.com>
e64749b to
88af31b
Compare
|
@wagoodman, I’ve migrated the provider to I also validated the changes using a personal Azure DevOps E2E pipeline. The pipeline:
Both E2E resolution paths completed successfully. Thanks for pointing me toward the migrated modules. 😄 Please note that If keeping this opt-in behavior is preferred, I can follow this with a Syft PR that enables the required tags in its release builds. If you would prefer containers-storage support to be compiled in by default, please let me know and I can revise the approach here. |
Adding Podman daemonless and Buildah support to Stereoscope for issue #197 and Syft issue 2107: Add support for containers-storage backend for container images
This feature adds:
containers-storage:go.podman.io/image/v5and delegates to the existing Docker archive provider.tags,os,architecture, andvariantis populated.containers-storageto allow for either auto detection or explicit usage via--from containers-storagedaemon->containers-storage->remote registry. Allowing locally built images to resolve before a remote pull.Build
The new provider is opt-in at build time. Use the build tag
containers_image_openpgp.Without this tag, Stereoscope compiles a stub provider that reports that containers-storage support was not included.
Static Linux builds may also require the
exclude_graphdriver_btrfsandexclude_graphdriver_devicemappertags. These tags exclude optional graph drivers that require native system dependencies.Dependency management
Pulled in
go.podman.io/image/v5 v5.40.0+go.podman.io/storage v1.63.0.Tests
New unit tests are in and passing.
Tested compiling for both Linux and non Linux builds and bundling this with a local copy of the latest Syft. Docker, Podman (daemon and daemonless) and buildah all working and creating consistent SBOMs. Compared with Syft v1.46.0
previous-syft-json-sboms.zip
and new version with stereoscope
new-syft-json-sboms.zip
Issues encountered and fixes
Dependency compatibility: The original implementation used the retired
github.com/containers/image/v5andgithub.com/containers/storagemodules and requiredgo.modreplacements forfilepath-securejoinandselinux.Empty source.metadata (tags / os / architecture): the docker-archive copy is tagless, and the archive provider never sets os/arch.
This has been edited since orginal PR