Lambda container and oci image manifest type

1

Hello,

I am trying to use podman to build lambda container.

When manifest type is application/vnd.oci.image.manifest.v1+json I get the following error:

"The image manifest or layer media type for the source image <snip> is not supported."

When I set manifest type to application/vnd.docker.distribution.manifest.v2+json it works.

In lambda faq (https://aws.amazon.com/lambda/faqs/) I read:

""" You can use any container tooling as long as it supports one of the following container image manifest formats: Docker Image Manifest V2 Schema 2 (used with Docker version 1.10 and newer) or Open Container Initiative (OCI) Specifications (v1.0 and up). For example, you can use native container tools (i.e. docker run, docker compose, Buildah and Packer) to define your functions as a container image and deploy to Lambda. """

So it should be supported.

I do not see what is wrong as all seems right.

Diff of inspect if I remove GraphDriver and expected timestamp and hash modifications... ends up with:

-        "ManifestType": "application/vnd.docker.distribution.manifest.v2+json",
+        "ManifestType": "application/vnd.oci.image.manifest.v1+json",

Does anyone have a clue?

Reproduce with this simple Containerfile:

from public.ecr.aws/lambda/python:3.9

run touch a
# works:
podman --format docker build .
# Does not work:
podman --format oci build .
已提問 2 年前檢視次數 688 次
1 個回答
0

I've tested with your Containerfile and reproduced the issue. The problems come with the multi arch manifest it automatically generates which apparently is not supported Specify a single arch to fix the issue: podman build . --arch=amd64 --os=linux

profile pictureAWS
ab
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南