I know that in an ASP.NET vNext project directory (where project.json exists), we can execute k run
(or k web
depending on the configuration/code) and KRuntime runs/starts the application/server.
我知道在ASP.NET vNext项目目录(其中存在project.json)中,我们可以执行k run(或k web,具体取决于配置/代码),KRuntime运行/启动应用程序/服务器。
I also realized that kpm build
creates a *.nupkg from your ASP.NET vNext project. That seemed like a sort of packaging to me and I can ship using that. However I couldn't find the correct way to bundle an app with all its dependencies and make it runnable with one command. Is there a way to do this?
我还意识到kpm build会从ASP.NET vNext项目中创建一个* .nupkg。这对我来说似乎是一种包装,我可以使用它。但是,我找不到将应用程序与其所有依赖项捆绑在一起的正确方法,并使用一个命令使其可运行。有没有办法做到这一点?
My use case will be building a Docker image that has Mono and will just drop the built ASP.NET vNext application in it and provide the entrypoint for the web server with one-liner command, like k web
. I looked at a few examples but I couldn't find a way to bundle an app with all its dependencies.
我的用例是构建一个具有Mono的Docker镜像,并将其中的构建的ASP.NET vNext应用程序放入其中,并使用单行命令(如k web)为Web服务器提供入口点。我查看了一些示例,但我找不到将应用程序与其所有依赖项捆绑在一起的方法。
1 个解决方案
#1
9
KPM pack is what you want. It will create a "deployment image" and a batch script (we don't support .sh yet but will eventually). There's likely a few bugs you will run into on mono:
KPM包是你想要的。它将创建一个“部署映像”和一个批处理脚本(我们不支持.sh但最终会支持)。单声道可能会遇到一些错误:
#1
9
KPM pack is what you want. It will create a "deployment image" and a batch script (we don't support .sh yet but will eventually). There's likely a few bugs you will run into on mono:
KPM包是你想要的。它将创建一个“部署映像”和一个批处理脚本(我们不支持.sh但最终会支持)。单声道可能会遇到一些错误: