testcontainers / testcontainers/testcontainers-java

Image Name Substitution not applied for DockerComposeContainers

Offen
#4,605 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

area/docker-compose
Vorherrschende Sprache
Java
Sterne
8.7k
Forks
1.9k
Ø Merge
2 T. 17 Std.
Gemergte PRs (30 T.)
9

Beschreibung

I have a set of tests which create a DockerComposeContainer on startup. I ran into the below error when the tests run on a CI server:

com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit"}

First, I tried setting a hub.image.name.prefix to point to my company's local registry, but continued to run into the error. I next tried creating a custom ImageNameSubstitutor to redirect images to my company's local registry, but that did not seem to help either. I then tried changing all image names in my docker-compose file to point at the local registry, and that seemed to resolve my problems.

I could be wrong, but I suspect this is because the image substitution mechanism is called from RemoteDockerImage, which is not used when parsing docker-compose files. My build logs seem to indicate that the ryuk and socat images are correctly being pulled from the local registry, but not the images referenced in the compose file.

Is this intended behavior? I don't see any references to docker-compose on the documentation page about image substitution.

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 Image-Behandlung von DockerComposeContainer und vergleiche sie mit dem von RemoteDockerImage verwendeten ImageNameSubstitutor-Pfad. Reproduziere den CI-Fall mit Pull-Rate-Limit mithilfe einer benutzerdefinierten Registry und einer Compose-Datei. Überprüfe anschließend, dass in Compose referenzierte Images konsistent umgeleitet werden und dass die Dokumentation zur Image-Substitution dieses Verhalten widerspiegelt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, docker-compose, java
Bereich
devops, testing
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
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.