testcontainers / testcontainers/testcontainers-python
Feature: read OCI images from the disk without requiring a tarball
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 2.3k
- Fork
- 386
- Merge medio
- 4h 40m
- PR unite (30g)
- 1
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla descrizione dell'issue e dalla pull request di bazel-examples collegata per comprendere l'OCI layout e come i layers vengono esposti su disco. Esamina la configurazione dei test Python e il suo utilizzo della Docker library, quindi determina come testcontainers potrebbe caricare direttamente gli OCI descriptors e blobs nel daemon. Il lavoro è completato quando è possibile testare immagini OCI locali senza costruire prima un tarball caricabile da Docker.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, python
- Ambito
- devops, testing
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100