我正在尝试找到一种将堆栈设置为“容器”的方法,以便我可以将我的应用程序部署在 docker 映像中,而不是 heroku-18 中。这样做的原因很复杂,但却是必要的。
Heroku Docker 镜像设置文档说我可以在我的app.json文件中执行此操作,如下所示:
"stack": "container"
但是这样做会在通过在线界面部署时出现错误:
! No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
! Push failed
Run Code Online (Sandbox Code Playgroud)
还有其他方法可以设置stack吗container?例如,根据这些文档,也可以使用 来设置它Dockerfile,但尚不清楚具体如何执行此操作。
我知道我可以使用 heroku CLI,但我更愿意在我的 git 存储库中进行设置,因为该应用程序也将部署到其他用户。
预先感谢您的任何建议!