testcontainers / testcontainers/testcontainers-java
"Unable to mount a file from test host into a running container" on Mac M1
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the localstack test and KPL producer scenario on a Mac M1 with Docker 3.4.0 and testcontainers 1.15.3, then compare it with the working docker run bind-mount example. Trace the test host file-mount setup; done means the test runs without the mount warning and the Kinesis scenario works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100