Running Testcontainers with Podman on macOS
Today I was working on an older project and encountered an issue where I couldn’t run some integration tests anymore. After some investigation, I realized this has to do with the fact that I no longer have Docker installed on my development environment.
I found a helpful tutorial on how to make Podman compatible with Testcontainers on your Mac. Just follow all the instructions in the tutorial below, and you should have Testcontainers up and running in no time on your machine. You can ignore that the post title says “Quarkus,” as the advice applies to any Podman installation on macOS.
The post mentions an SSH issue, but I didn’t face this with my installation.
Finally, I did encounter an issue where my local qemu
process hung after going through these steps and then trying to restart the Podman machine using podman machine stop && podman machine start
. If you encounter a similar issue, find your local qemu
process using the command below.
ps aux | grep qemu
You can grab the process ID from the output and use the kill command to force stop the qemu
process.
kill -9 <PID>
With the preamble out of the way. Here is the link to the how-to guide: Using Podman with Quarkus and Testcontainers on MacOS