I am deploying a .Net Core application using Docker Containers.
I was able to push the image successfully using heroku container:push web
But calling heroku container:release web returns No command specified for process type web.
I'm a bit stumped I've tried adding heroku.yml
setup:
addons:
- plan: heroku-postgresql
as: DATABASE
build:
docker:
web: Dockerfile
config:
ASPNETCORE_ENVIRONMENT: development
run:
web: dotnet Api.dll
On the root directory but still no luck.
I can confirm that the image was created I'm seeing this in docker
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.heroku.com/immense-temple-11020/web latest 5cb62a9af317 16 minutes ago 272MB
If anyone could point me to the right direction, it would be much appreciated. Thanks!
All Heroku applications run in a collection of lightweight Linux containers called dynos. Starting November 28th, 2022, free Heroku Dynos, free Heroku Postgres, and free Heroku Data for Redis® will no longer be available.
The containers used at Heroku are called “dynos.” Dynos are isolated, virtualized Linux containers that are designed to execute code based on a user-specified command. Your app can scale to any specified number of dynos based on its resource demands.
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."
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