I'm attempting to build a Docker image on my Mac M1 machine using the public.ecr.aws/lambda/python:3.8 image from Amazon ECR Public as the base image in my Dockerfile. However, I'm encountering the following error during the image pull process:
ERROR: failed to solve: public.ecr.aws/lambda/python:3.8: pulling from host public.ecr.aws failed with status code: 403 Forbidden
Here's the relevant portion of my Dockerfile:
FROM public.ecr.aws/lambda/python:3.8COPY requirements.txt .RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"COPY app.py ${LAMBDA_TASK_ROOT}CMD [ "app.handler" ]
i tried all the things like running build or buildx build --platform linux/amd64 command but no luck.
i tried directly from python:slim and i got result but i want to use public ecr.