Podman 3.x Health Script Issues with OCI Image Manifest Format
Daniel Nashed – 11 April 2021 21:09:27
CentOS 8 Stream updated to Podman 3.1 -- In contrast to CentOS 8 which still comes with Podman 2.2.1
When building Docker images on Podman 3 contain health script you get the following error:
WARN[0340] Healthcheck is not supported for OCI image format and will be ignored. Must use `docker` format
It turns out that Podman changed the default to the OCSI Image format. Not sure in which version this exactly started.
But this doesn't support the standard health scripts. And it probably makes sense to stay with the Docker V2 format for other reasons.
When you look into the image with inspect, you see the manifest type and version:
"ManifestType": "application/vnd.oci.image.manifest.v1+json"
How to change the manifest format back to Docker format
1. There is a format option for the build command.
--format
Control the format for the built image’s manifest and configuration data. Recognized formats include oci (OCI image-spec v1.0, the default)
and docker (version 2, using schema format 2 for the manifest).
Note: You can also override the default format by setting the BUILDAH_FORMAT environment variable.
2. Or you can specify the format via environment variables.
export BUILDAH_FORMAT=docker
Once set Podman will build using the Docker format again:
"ManifestType": "application/vnd.docker.distribution.manifest.v2+json"
For our Domino on Docker community image I added added the variable into our build.sh.
If not specified in the configuration, it defaults to "docker".
- Comments [1]