3

I've configured multi container using Docker Compose Task in Azure Pipeline. I could not able to get URL for the multi container application.

Do I need to configure the app service along with the docker compose task?

Please guide!!!

UPDATE

In order to get the application's URL from DockerCompose Task, Can make use of Azure CLI commands provided in the following documentation link suggested by Merlin Liang - MSFT

https://learn.microsoft.com/en-us/azure/container-instances/container-instances-multi-container-yaml#view-deployment-state

Kumaresh Babu N S
  • 1,648
  • 5
  • 23
  • 39

1 Answers1

1

Not sure here which URL is you are looking for.

1) If what you means is the browsing URL of your APP, you could find it in Overview tab of app service:

enter image description here

Even though it is a multi-container app, this URL has fixed format, and do not be affected by anything:

http://<your-app-name>.azurewebsites.net

2) If what you want is a integrate URL which used to notify/update the app service once a new version of the image is available.

Just go Container settings => Continuous Deployment => Webhook URL:

enter image description here


Do I need to configure the app service along with the docker compose task?

This depend on your actual demand. It is not necessary in most scenarios.

Docker compose task used to orchestration your container. Based on your last SO ticket, you just run service. In fact, in Azure Web App for Containers task. it integrate this part:

enter image description here

If you think here it can not satisfied your usage, you could make use of Docker compose task.


Updated in 2020/3/2:

If someone just build and push the containerization app into ACR, without any integrate with Azure app service. At this time, the browsing url should be look like localhost:<port>.

To get exact host name and ip address, just run below commands to get:

az container show --resource-group myResourceGroup --name myContainerGroup --output table
Mengdi Liang
  • 17,577
  • 2
  • 28
  • 35
  • I'm using Run Services task from DockerCompose Task in Release pipeline. I have docker image in ACR. From the settings, I have provided the service connection for ACR and got the image as well. But There is no option to integrate with other service like App Service. In DockerCompose Task, The logs shows creating the docker network but how to access the application in browser? – Kumaresh Babu N S Mar 02 '20 at 05:04
  • @KumareshBabuNS, could you see the app url as I mentioned in my first screenshot? – Mengdi Liang Mar 02 '20 at 05:08
  • Yes @Merlin Liang - MSFT. But I have not integrated the docker compose task with the app service. There is no settings available in DockerComposeTask. – Kumaresh Babu N S Mar 02 '20 at 05:09
  • In the case of Azure Web App for Containers task in Release pipeline, I have used DockerHub with public registry it is working fine and can able to pull the images. When I using ACR, I have authentication problem like `docker login` in App service. Unable to pull the docker images from ACR and no option to provide the service connection for ACR in the task settings. – Kumaresh Babu N S Mar 02 '20 at 05:20
  • @KumareshBabuNS. Seems got what you are looking. Do you mean you **just** run the service with dockercompose task, and did not using/integrate any app service with that container app? If this, your url would be look like `localhost:8080`. Just change the port number to the one your configured. – Mengdi Liang Mar 02 '20 at 05:20
  • Thanks @Merlin Liang- MSFT, How to get the host name or ip address in Azure DevOps? – Kumaresh Babu N S Mar 02 '20 at 05:22
  • 1
    @KumareshBabuNS, since you are using ACR, we have command can get that: az container show --resource-group myResourceGroup --name myContainerGroup --output table. Try follow this: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-multi-container-yaml#view-deployment-state – Mengdi Liang Mar 02 '20 at 05:30
  • Thanks @Merlin Liang - MSFT. In Azure Web App for Containers task settings, I have included `docker login` command for accessing ACR. It works and pulled the docker image from ACR and got the exact output on App Service deployment. – Kumaresh Babu N S Mar 02 '20 at 05:41
  • @KumareshBabuNS. ehh? Any error got? Or work successfully? – Mengdi Liang Mar 02 '20 at 05:44
  • 1
    @KumareshBabuNS. Great to know! Will add this commands and relevant content into answer, to help others also:-) – Mengdi Liang Mar 02 '20 at 05:47