heroku:container M1 mac pushing docker image layer stuck in retry loop

77 views Asked by At

I'm trying to push my containerized Flask app to Heroku. I've read that there are issues with M1 macs here so have the following Dockerfile:

FROM --platform=linux/amd64 python:3.8-buster
WORKDIR /
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
ENTRYPOINT [ "python3" ]
CMD [ "app.py" ]

I then run the following commands:

docker buildx build --platform=linux/amd64 --no-cache  -t {name} .
heroku container:push web -a {name}

The build succeeds, but the push to Heroku gets stuck on a retry loop at the largest layer (8.6GB). I looked in to the layer and it runs the following:

<missing>      3 minutes ago    RUN /bin/sh -c pip install -r requirements.t…   8.57GB    buildkit.dockerfile.v0

Have tried a total fresh rebuild, docker prune, etc. Before the linux/amd64 option, the push to Heroku was succesful, but would crash with an Exec Error. Any ideas/thoughts much appreciated, thank you.

0

There are 0 answers