Today I was helping a colleague to get an existing application containerized. To run the containerized workload we were using Podman Desktop. When we opened Podman Desktop, we got the question if we wanted to upgrade the podman version. Of course we said yes! Unfortunately after the upgrade was completed, podman failed to start and always returned the following error message: > podman build Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: open C:\Users\<username>\.ssh\known_hosts: The system cannot find the path specified. We were able to continue by applying a workaround. By manually creating the .ssh folder in the user directory podman was able to run successfully. Problem solved! More information Missing known_hosts file in Windows prevents connection as of 5.3.0 · Issue ...
This one is just a small reminder for myself. Yesterday I talked about how I helped a colleague to get started with Podman through Podman Desktop. Today he contacted me again when trying to build an updated image of the application. Here is what he tried to do: >podman build This failed with the following error message: Error: no context directory and no Containerfile specified Do you notice what is missing? He forgot to specify the context directory. In this case he was running the command at the same location that the Dockerfile could be found. So we added a ‘.’ to specify that the current directory could be used: >podman build . If the dockerfile could be found at another location, just specify the relative or absolute path: >podman build path/to/directory That’s it!