testcontainers / testcontainers/testcontainers-java
Image Name Substitution not applied for DockerComposeContainers
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 8.7k
- Fork
- 1.9k
- Merge medio
- 2g 17h
- PR unite (30g)
- 9
Descrizione
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.
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 gestione delle immagini di DockerComposeContainer e confrontala con il percorso ImageNameSubstitutor utilizzato da RemoteDockerImage. Riproduci il caso CI con limite della frequenza dei pull usando un registry personalizzato e un file Compose, quindi verifica che le immagini referenziate da Compose vengano reindirizzate in modo coerente e che la documentazione sulla sostituzione delle immagini rifletta questo comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, docker-compose, java
- Ambito
- devops, testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100