Heroku CLI "No command specified for process type web" when releasing container
Did you have a CMD
directive specified at the end of your Dockerfile? If not, that was likely causing the problem, which you then worked around by using heroku.yml
and heroku stack:set container
.
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 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.
Since you switched to using heroku.yml
you were able to get around the CMD
by using
run:
web: dotnet Api.dll
Heroku docs say "If you don’t include a run
section, Heroku uses the CMD
specified in the Dockerfile."