We can create MQ Containers using the MQ Container image on Podman. I have seen users facing issues with Podman whilst using the MQ container image with Podman to create MQ Containers so, I believed the MQ Forum would be the appropriate place to put up this blogpost.
One of these issues(shown below) is essentially caused by a major version difference between the client and server. This can be seen on the terminal when the user tries to run a container using the
Error: Post "http://gateway.containers.internal/services/forwarder/expose": dial tcp: lookup gateway.containers.internal: no such host
You can confirm the version difference by running the following command on your terminal:
To resolve this issue, we need to match said versions. For this example, we will be using Homebrew and MacOS. Use the equivalent commands if you are using a different OS.
- Run the following command to update homebrew. If you did not install podman using homebrew, use an equivalent update command.
If this command is failing then try uninstalling and re-installing brew. To uninstall homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
To re-install homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
One this is successful, we need to install (if you didn't uninstall homebrew then, update) podman. To do this, run the following command:
brew install podman
This installation may take sometime.
Now, if this installation is successful, run
podman version once again. This time you should see that the major version of the client and server have been matched.
Before you run a container, stop the existing podman machine and create a new one.
podman machine stop
podman machine rm
podman machine init
podman machine start
This should resolve the issue. You can now pull an image from an image repository and run a container using Podman.