testcontainers / testcontainers/testcontainers-java
"Unable to mount a file from test host into a running container" on Mac M1
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 8.7k
- Forks
- 1.9k
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
I get the above error but I am able to start a container with a bind mount. For example this work on my machine:
docker run -d \
-it \
--name devtest \
--mount type=bind,source="$(pwd)"/target,target=/app \
nginx:latest
But running a test with testcontainers localstack I get :
Unable to mount a file from test host into a running container. This may be a misconfiguration or limitation of your Docker environment. Some features might not work.
Docker version 3.4.0
testcontainers version: 1.15.3
Mac M1
Any ideas?
I initially experienced this issue when trying to run a test with KPL producer sending messages to Kinesis:
⚠︎ Unable to mount a file from test host into a running container. This may be a misconfiguration or limitation of your Docker environment. Some features might not work.
[kpl-daemon-0003] ERROR com.amazonaws.services.kinesis.producer.LogInputStreamReader - [0x00006c9a][0x00000003061dc000] [error] [shard_map.cc:154] Shard map update for stream "invalid-stream" failed. Code: ResourceNotFoundException Message: Stream invalid-stream under account 000000000000 not found. with address : 127.0.0.1; retrying in 1000 ms
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den localstack-Test und das KPL-Produzentenszenario auf einem Mac M1 mit Docker 3.4.0 und testcontainers 1.15.3 zu reproduzieren, und vergleiche es anschließend mit dem funktionierenden docker run-Beispiel für ein Bind-Mount. Verfolge die Einrichtung des Datei-Mounts auf dem Test-Host; abgeschlossen ist die Aufgabe, wenn der Test ohne die Mount-Warnung läuft und das Kinesis-Szenario wie erwartet funktioniert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- docker, java
- Bereich
- devops, testing
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100