Search code examples
linuxazureazure-devopsnexus3

How to connect from Azure pipeline to private Container Instance?


I've got a pipeline building an RPM package which I'd like to upload to our Nexus server. The Nexus server runs on an ACI (Azure Container Instance). The ACI is using a private network.

IF I've got it right the intended way is:

  1. Create a Generic service connection containing the url, credentials and root directory of the ACI.
  2. Use the cUrl task to select the file and use the Generic service to perform the upload.

The problem however is that the pipeline vm can not connect to the ACI (no route to host).

Can somebody help me to fix this ? Or give me pointers to online resources ?


Solution

  • As I know, when you create the ACI in the private network, it means you cannot access it outside directly. But you can use the Azure Application Gateway to access the ACI by adding the private IP address to the backend. And you can also use this way to upload files to the ACI.

    And there is also another way to upload files to the ACI in the private network. In this way, you need to mount the Azure File Share to the ACI in the creation time and then you can upload files to that Azure File Share. You can access these files in the mount point of the ACI. I recommend this way more than others.