Site logo

Colima and Testcontainers 06/19/23

Lately I've been using Colima as a replacement for Docker Desktop.

While it is not a perfect replacement, it gets the job done (plus it runs on QEMU which I think is kind of a cool solution for lightweight virtualization). I recently ran into an odd case where some stuff that uses Docker under the hood failed to spin up containers, such as Testcontainers.

For some reason, Testcontainers failed to find the local Docker, and the only solution I could find is this lengthy Github issue. Allow me to spare you the hop:

colima uses $HOME/.colima/docker.sock.

Setting DOCKER_HOST="unix://$HOME/.colima/docker.sock" fixes any issues I ran into with Testcontainers.

Perhaps it will help you in other ways as well 🙏🏼.

Update (2024-04-02)

I've been using Colima v0.6.8 lately and have been seeing nothing but errors (on startup, port-forwards from containers aren't working, etc.).

After diving deep into this issue, only one thing ended up solving my issue: downgrading to v0.5.6.