locked
How to push docker-compose to Azure Container Registry? RRS feed

  • Question

  • User1846752346 posted

    Hi, I had created a simple asp.net core web api project, created a docker image and then pushed it to Azure container registry successfully. Next, I added sql server db in it using a docker-compose file. Now, I want to host this file to Azure Container Registry. Basically, I want to host these images in ACR and then select these images and run them in Azure Web App Service. 

    But when I try to push the docker-compose file, I don't see anything happening. Neither failure or success and images are not to be found on Azure Container Registry as well. I am connecting to my registry through powershell and using docker-compose push command.

    Can anyone tell me how to proceed further?

    Here is my docker-compose file:

    version:  '3.2'
    services:
      ms-sql-server:
        image: mcr.microsoft.com/mssql/server:2019-latest
        environment:
          - SA_PASSWORD=astrongpass
          - ACCEPT_EULA=Y
        ports:
          - "1433:1433"
      api:
        image: <nameofregistry>.azurecr.io/aspnetcore/demoapp
        ports: 
          - "8080:80"
        depends_on: 
          - ms-sql-server
    Wednesday, March 17, 2021 4:28 AM

All replies

  • User-2054057000 posted

    You are pushing image to ACR from command prompt or terminal. To do this you will need to install Azure CLI on your pc and then from your command prompt login to azure container registry and then push it.  

    Kindly refer this video - https://www.youtube.com/watch?v=sdnueXPqy5k which does <yt-formatted-string force-default-style="" class="style-scope ytd-video-primary-info-renderer">Deploying of Multi-Container ASP.NET Core app on Dockers to Azure Container Instances. You will find the push images to acr from 7:25 time.</yt-formatted-string>

    Friday, April 2, 2021 7:19 PM