I'm using gke engine to run the docker image. Whenever I'm pushing the container it says exec /usr/local/bin/gunicorn exec format error. I can see this error inside the pod log.
Using macbook m1 pro chip
Here is my Docker file:
FROM python:3.7
WORKDIR /app
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
RUN ls -la ./
EXPOSE 80
ENTRYPOINT ["gunicorn", "-w", "2", "-b", ":80", "main:app", "--timeout", "300"]
How can I solve it?
change the base image to be compatible with platform change to below if for a linux or add any related platform
FROM --platform=linux/amd64 python:3.7
This worked for me in AWS, for other ways to handle visit this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With