英文:
How can I keep exe file in azure container app and execute from deployed code?
问题
我已创建 Azure 容器应用程序,想要部署我的 C# 应用程序工作进程,想要从 C# 代码中执行第三方 exe 文件,如何在容器应用程序中部署代码?
如何从部署的代码中执行 exe 文件?
在容器应用程序中的哪里保存 exe 文件?
英文:
I have created azure container app, want to deploy my C# application worker process, want to execute 3rd party exe from the C# code, How can deploy the code in container app?
How can I execute exe from deployed code?
Where to keep exe file in container app?
答案1
得分: 0
我明白您的要求,以下是翻译好的部分:
首先,要在Azure容器应用中部署您的C#应用程序工作进程,您可以创建一个Dockerfile,然后构建容器映像。请注意,您可以在Docker文件中包含第三方exe文件的路径,并在构建容器映像时使用COPY参数将其复制到容器映像中。
然后,您可以将此Docker映像推送到容器注册表或DockerHub。
要从容器应用中的工作C#应用程序运行此第三方exe文件,您可以使用C#中的Process类来启动一个新进程并执行exe文件。请参阅这里和这里。
有关构建和部署应用程序到Azure容器应用的教程,请参阅这里。
英文:
I see that your requirement is to run the third party exe from your c# worker process which will be deployed to the Azure Container App. I am sharing a few suggestions here if that helps.
Firstly, to deploy your C# application worker process in an Azure container app, you can create a Dockerfile and then build the container image. Note that you can include your 3rd party exe path in docker file and use the COPY parameter to copy this within the container image while building this container image.
Then you can push this docker image to either container registry or dockerhub.
To run this 3rd party exe from your worker C# app within the container app, you can use the Process class in C# to start a new process and execute the exe file. See here and here.
This is tutorial to Build and deploy your app to Azure Container Apps see here.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论