testcontainers / testcontainers/testcontainers-python

Feature: read OCI images from the disk without requiring a tarball

未关闭
#424 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

🚀 enhancement
主要语言
Python
星标
2.3k
派生
386
平均合并
4 小时 40 分钟
30 天内合并 PR
1

描述

What are you trying to do?

Under Bazel, or other local-only build systems, an image is constructed as a series of layers which are only on the disk, not pushed to any remote docker registry.

To test such an image, one option is to create a tarball format that's suitable for docker load. Then in the Setup of the python test, you can use the docker library from Pypi to do that docker load.
However, constructing the tarball is an expensive operation. In particular as Bazel has distinct build steps that can run remotely and have cached results, we get a massive file for a typical user image that has to be stored on a network location. Building the tarball should not be required, it's just a way to be docker load-compatible.

Instead, we could teach testcontainers how to read the OCI format, which is a JSON descriptor pointing to the layers as blobs. These could be loaded into the daemon directly.

https://github.com/aspect-build/bazel-examples/pull/306 shows how this looks.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 issue 描述和链接的 bazel-examples pull request 开始,了解 OCI layout 以及 layers 如何在磁盘上暴露。查看 Python 测试设置及其对 Docker library 的使用,然后确定 testcontainers 如何将 OCI descriptors 和 blobs 直接加载到 daemon 中。完成的标准是:无需先构建 Docker-loadable tarball,即可测试本地 OCI images。

由索引模型根据 Issue 内容生成。

评估

技术栈
docker, python
领域
devops, testing
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。