Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't deploy container image to lambda function

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" ]
like image 408
Bramanta Avatar asked Sep 02 '25 01:09

Bramanta


1 Answers

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

like image 107
SharpThunder Avatar answered Sep 04 '25 14:09

SharpThunder