Colima, Apple M1 and Testcontainers
My choice is Colima.
Set up Colima
Installing Colima is very easy with Homebrew:
brew install colima
Then start Colima with specified CPU and memory:
colima start --cpu 4 --memory 8
Colima server is available at the sock address
You can use
docker client to connect to Colima server.
docker context ls to list all contexts, then use
docker context use colima to switch to Colima.
If you are using macOS on Apple M1 chip, you need to make sure at least JNA
5.7.0 is used. Elasticsearch old versions have its own JNA distribution. Make sure the version is also upgraded if it's included as transitive dependency.
The following environment variables are required to run Testcontainers using Colima.
Here is why these environment variables are required:
DOCKER_HOSTspecifies the sock address of Colima.
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDEspecifies the sock address inside of the container.
TESTCONTAINERS_RYUK_DISABLEDdisables Ryuk, otherwise the container won't exit and the test will eventually time-out.