Skip to content

Heroku manual deployment does not work on M1 mac #2

Description

@priyaraj7

The deployment instructions here don't work for M1 mac. The image that gets built is not compatible with heroku and get error with exit code 126 and message.

Error: Exec format error

Deploy on heroku - manually
step 1: - heroku login
step 2:- Login to heroku container registry
command:- heroku container:login
step 3:- Build docker image and push to heroku container registry
command:- heroku container:push -a udemy-fastify-course web
step 4:- Run docker image on heroku
comamnd:- heroku container:release -a udemy-fastify-course web

I managed to work around this by changing the deployment steps to following

step 1: - command:- heroku login

step 2:- Login to heroku container registry
command:- heroku container:login

step 3: Build docker image for amd64
docker buildx build --platform linux/amd64 -t udemy-fastify-course .
docker tag learn-fastify registry.heroku.com/udemy-fastify-course/web
docker push registry.heroku.com/udemy-fastify-course/web
heroku container:release web -a udemy-fastify-course

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions