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 .
gefragt vor 2 Jahren688 Aufrufe
1 Antwort
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
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen