Search code examples
azure.net-coreazure-batch

How to run DotNet Core applications in Azure Batch Jobs


I have followed Azure Batch ffmpeg tutorial and it works as expected. The problem that I have at this point is that my executable that i want to run as a batch is a dotnet core application and images that are available when creating a Pool do not have dot net core installed. In the task command line I need to run something like dotnet myApp.dll myParam but dotnet is not available.

How do I go about having an image that has dotnet core installed. Do I need to create a custom image? Is there a tutorial for doing that. I tried using Docker with dotnetcore runtime image at some point for running the same application locally and that seems to work. Do I need to export this image to Azure somehow? Or can I push the core installation into an image in another way?

Thanks.


Solution

  • If I am understanding your issue correctly, the simplest solution I see would be create your own custom image to provision a batch pool. We have a document on achieving that here:

    https://learn.microsoft.com/en-us/azure/batch/batch-custom-images

    This way you can preconfigure an image that has all the needed programs and languages installed right away.