Monitor And Manage Windows Containers In Microsoft Azure Using Docker

This article will show you how to manage and monitor Windows Server containers using Docker command line running on Microsoft Azure Cloud.

In my previous two article about running Windows containers In Microsoft Azure I explained how to setup Windows Servers containers and how to create them using Docker, make sure you read them before continuing.

Today I will show you how to monitor them and manage them using the Docker command line.

I’m assuming you already have Windows Containers running.

To view all you containers and their status type:

Docker ps -a

To view only running containers type:

Docker ps

To view total container size type:

docker ps -s

To view containers using filter type:

docker ps --filter status=exited

To start a container and keep It running type:

docker start id

To restart a container

Docker restart id

To stop a container

Docker stop id

To connect to a running container type:

docker attach b96707abdec5

To exit a running container and keep It running

Ctrl + p + q

To view container logs

Docker logs id