Finding the container id of a customer docker image running under Azure app service

arda savran 1 Reputation point
2020-12-09T21:44:08.377+00:00

We just deployed our custom docker image on Azure Webapp services. I think the docker is running fine but we need to know the container-id of the specific webapp service. We checked the logs on Azure portal for the app service instance; had no luck. We tried to SSH to the container to grab the container ID; had a "connection refused" error. Does anyone know how to easily grab the container id of a webapp that runs based on docker on Azure? Thanks

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
633 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,829 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 18,196 Reputation points
    2020-12-10T09:52:50.823+00:00

    Thanks for asking question! Could you please confirm on what do mean from container id?
    You can check container name from the background by going to the Web App in the Azure portal and looking at the Logs in the Container settings.

    Further if you are getting connection refused error while connecting with SSH then you need to enable the SSH in the custom image.

    Check this doc link for enabling SSH https://learn.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#enable-ssh

    Additional details : Things You Should Know: Web Apps and Linux

    0 comments No comments

  2. arda savran 1 Reputation point
    2020-12-10T21:33:56.707+00:00

    Thank you for the answer.

    Typically, as soon as a container is started it is assigned a long id number by the docker service. This ID can be seen in the output for "docker ps" command.

    I noticed that the Azure Webapp logs reveal the container name but IDs are never mentioned anywhere on the Azure WEB portal.

    Thanks,

    Arda

    0 comments No comments

  3. SnehaAgrawal-MSFT 18,196 Reputation points
    2020-12-14T07:26:21.15+00:00

    Thanks for reply! Yes you are correct. Also you may want to know ; Web App for Containers is catered more towards developers who want to have more control over, not just the code, but also the different packages, runtime framework, tooling etc. that are installed on their containers. This offering is essentially bringing years worth of Azure App Service PaaS innovations to the community, by allowing developers to just focus on composing their containers without worrying about managing and maintaining an underlying container orchestrator. Customers of this offering prefer to package their code and dependencies into containers using various CI/CD systems like Jenkins, Maven, Travis CI or Azure DevOps, alongside setting up continuous deployment web hooks with App Service.

    You may also refer to this thread explaining Difference between Container Instances and Container for Webapps might be helpful

    If the above answer was helpful, kindly do ‘Accept as answer' and/or ‘Vote as helpful’ the post for benefitting the other users with a similar issue.

    0 comments No comments