I try to deploy container image to lambda function, but this error message appear
The image manifest or layer media type for the source image <image_source> is not supported.
here is my Dockerfile, i believe i have use the proper setup
FROM public.ecr.aws/lambda/python:3.8
# Install dependencies
COPY requirements.txt ./
RUN pip install -r requirements.txt
# Copy function code
COPY app/* ./
# Set the CMD to your handler
CMD [ "lambda_function.lambda_handler" ]
Try by specifying the target platform of the image you build as amd64
:
docker build --platform linux/amd64. -t my_image
docker build --platform linux/amd64. -t my_image
.
I get the same error while trying to deploy a lambda based on an image that supports both linux/amd64
and linux/arm64/v8
(Apple Silicon) architectures.
If you are using buildx >= 0.10 specifying target platform does not work since it also creates multi-platform index by default.
To fix this problem set --provenance=false
to docker build.
For more details please see: https://github.com/docker/buildx/issues/1509#issuecomment-1378538197
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.