buildah: Unknown media type during manifest conversion: "application/vnd.docker.image.rootfs.diff.tar.gzip"
Description
Steps to reproduce the issue:
I have an image built with Kaniko in CI, that I am trying to use as base image for another that I am building locally with podman build.
The local image has the following Containerfile
FROM ci-registry.company.com/image_build_with_kaniko
RUN echo "Hello"
If I build the image with podman build -f Containerfile -t tmp-image . I get the following error: (Adding --format=docker gets the same error)
Trying to pull ci-registry.company.com/image_build_with_kaniko
Getting image source signatures
Copying blob c408bb006db1 done
Copying blob 60c686673fbf done
Copying blob 46da271691fa done
Copying blob 1aa347c632b6 done
Copying config 04ee292f7a done
Writing manifest to image destination
Storing signatures
Error: error creating build container: error preparing image configuration: error converting image
"containers-storage:[overlay@/var/lib/containers/storage+/run/containers/storage:overlay.mountopt=nodev]@04ee292f7a5549e765c99205acc567738a09eb084409cd71f6600facd3743c51"
from "application/vnd.oci.image.manifest.v1+json" to "application/vnd.docker.distribution.manifest.v2+json":
Unknown media type during manifest conversion: "application/vnd.docker.image.rootfs.diff.tar.gzip"
Describe the results you expected:
The build should continue, maybe? What is going wrong here?
Output of podman version if reporting a podman build issue:
3.4.4-1
Output of cat /etc/*release:
cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
Output of uname -a:
Linux PC 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 GNU/Linux
Output of cat /etc/containers/storage.conf:
Did not touch this / Default one
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (7 by maintainers)
I found a potential solution to solve this issue.
If you build your base image with
podman build -t base_image .as usual, you will obtain an OCI mediaType manifest.then you do:
podman push -f v2s2 registry.company.ch/base_imagewhen you push it to your registry.
This will allow you to have a Docker mediaType manifest.
which will no more be a problem for Kaniko and its way of adding Docker mediaType layers in your manifest.
I dunno. https://github.com/GoogleContainerTools/kaniko/issues/1836 is labeled “help wanted”, so one or both of:
Obviously doing neither, and hoping Kaniko fixes it without help, is attractive.
Yes, that’s the same underlying cause. The Kaniko-built images are inconsistent, and basically any kind of consumption (not just builds using Buildah) could, in principle, cause them to be rejected. (The actual implementation only rejects them on some code paths, but that’s just an implementation detail, not a maintained feature.)