I did heroku container:push web
and it gives Your image has been successfully pushed. You can now release it with the 'container:release' command.
Then I ran heroku container:release web
and it says
No command specified for process type web
I also tried heroku stack:set container
as suggested here but no change.
I have Profile as
web: gunicorn app:app --log-file=-
Not sure what's wrong and how to debug this. Any help is appreciated!
Changing from ENTRYPOINT
to CMD
fixed this issue for me
You need to have a CMD
directive specified at the end of your Dockerfile.
Heroku is unclear on this in their documentation. I was able to get my container to run locally without a CMD
directive, likely as you were. But if you read Heroku docs here or here you'll pick up that Heroku takes for granted that the Dockerfile will specify a CMD
to run.
I read here that Heroku requires all images to have the CMD
directive specified, but I couldn't find that explicitly in Heroku docs.
I had the same problem until I added the CMD
directive at the end of my Dockerfile. I'm still working though what exactly I should put as my CMD
directive but I no longer get the No command specified for process type web
error.
Here's the Docker documentation on CMD
: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#cmd
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