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

Dileepa 6 Reputation points MVP
2021-09-09T07:11:22.69+00:00

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 Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
393 questions
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
643 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,395 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SRIJIT-BOSE-MSFT 4,326 Reputation points Microsoft Employee
    2021-09-13T13:43:04.23+00:00

    @Dileepa , 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.

    0 comments No comments