Heroku CLI“未为进程类型web指定命令”释放容器时 [英] Heroku CLI "No command specified for process type web" when releasing container
本文介绍了Heroku CLI“未为进程类型web指定命令”释放容器时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Docker容器部署.Net Core应用程序。
I am deploying a .Net Core application using Docker Containers.
我能够使用 heroku容器成功推送映像:push web
但是调用 heroku container:release web
会返回否为进程类型web指定的命令
。
我有点困惑,我尝试添加 heroku.yml
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.
我可以确认映像已创建,我在docker中看到了
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!
推荐答案
我在搜索了几个小时后才找出原因。
I figured out the reason after searching for hours.
显然如果忘记调用
heroku stack:set容器
。
现在我可以部署和发布了!
Now I'm able to deploy and release!
这篇关于Heroku CLI“未为进程类型web指定命令”释放容器时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文