testcontainers / testcontainers/testcontainers-python

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

Offen
#424 1 Kommentar 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

🚀 enhancement
Vorherrschende Sprache
Python
Sterne
2.3k
Forks
386
Ø Merge
4 Std. 40 Min.
Gemergte PRs (30 T.)
1

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der Problembeschreibung und dem verknüpften bazel-examples pull request, um das OCI layout und zu verstehen, wie layers auf der Festplatte bereitgestellt werden. Sieh dir das Python test setup und dessen Verwendung der Docker library an und ermittle anschließend, wie testcontainers OCI descriptors und blobs direkt in den daemon laden könnte. Fertig ist die Aufgabe, wenn lokale OCI images getestet werden können, ohne vorher ein Docker-loadable tarball zu erstellen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, python
Bereich
devops, testing
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.