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!