question

dsrajapaksa avatar image
0 Votes"
dsrajapaksa asked srbose-msft answered

How to package common DLLs to to Azure Container Registry and refer them to multiple apps

I have a specific requirement on referring common .DLL files to multiple applications running on Azure Container instances/App Services. What I want to do is to package all the .DLL files to one docker image and put them in a container registry or docker hub and use them in the application runtime of other applications as common libraries. This is required to migrate to the cloud from the following architecture in an on-prem IIS server. Is this possible to do in Azure using a Container registry - how to approach this?

130656-image.png


azure-container-instancesdotnet-adazure-container-registry
image.png (42.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

srbose-msft avatar image
0 Votes"
srbose-msft answered

@dsrajapaksa , thank you for your question.

Sticking to the ask in your verbatim, yes it is possible to package all your DLLs into a container image and push it to an Azure Container registry. You can follow the Dockerfile reference here to build your image.

However, one would agree to the comments on your question here. Creating a container image that has all the DLLs in it would let you build Dockerfiles for other applications using the former image as the base image, but every containerized instance of these applications will carry the bulk of all the DLLs including the unnecessary ones. Thereby making the solution less distributed and adding huge deadweight. In fact some of the comments here point to the more practical approach of wrapping the DLLs into APIs that can be accessed by your applications.


Hope this helps.

Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.