testcontainers / testcontainers/testcontainers-python
Feature: read OCI images from the disk without requiring a tarball
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 2.3k
- Forks
- 386
- Merge moyen
- 4 h 40 min
- PR mergées (30 j)
- 1
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par la description de l'issue et la pull request bazel-examples associée afin de comprendre l'OCI layout et la manière dont les layers sont exposées sur le disque. Examinez la configuration des tests Python et son utilisation de la Docker library, puis déterminez comment testcontainers pourrait charger directement les OCI descriptors et blobs dans le daemon. La tâche est terminée lorsque des images OCI locales peuvent être testées sans construire au préalable un tarball chargeable par Docker.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- docker, python
- Domaine
- devops, testing
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100