Help & DocumentationSystem AdministrationDeployment & Configuration Deploying Metric InsightsDocker Commands Cheat Sheet (Simple Install / Single-server / Non-orchestrated)

Docker Commands Cheat Sheet (Simple Install / Single-server / Non-orchestrated)

Here you'll find a list of Docker and Docker Swarm commands you can use to manage Metric Insights for Swarm (orchestrated environment). 

  1. Getting Information
  2. Getting into container
  3. Getting Logs
  4. Restarting/Removing/Stopping/Starting Containers


1.) Getting Information

  • Get list of running Docker containers (Simple installation):

docker ps 

docker ps -a

 

  • Get more information about a Docker Container:

docker inspect <container id>   

2.) Getting into container

docker exec -it <container ID> bash

Alternatively:

mi-console (enter web container)

mi-console dataprocessor (enter dataprocessor container)

mi-console seed (enter seed container)

mi-console monitoring (enter monitoring container)

mi-console data-analyzer (enter data-analyzer container)

3.) Getting Logs

See Docker Container logs for Simple Installation:

cd /opt/mi/log 

4.) Restarting/Removing/Stopping/Starting Containers

mi-control restart (with no arguments, will restart all MI Docker containers)

mi-control restart dataprocessor (will restart just the dataprocessor container -- you can input any service name such as web, seed, monitoring, data-analyzer, etc.)


mi-control stop (stop all MI containers/effectively stopping the MI app)

mi-control start (start all MI containers)


mi-control down dataprocessor (stop the dataprocessor container -- you can input any service name such as web, seed, monitoring, data-analyzer, etc.)


mi-control rm --stop dataprocessor seed (Removing dataprocessor and seed containers because they are stuck in some undesired state -- this is 1st step to redeploy a container. You can input any service name such as web, seed, monitoring, data-analyzer, etc.)

mi-control up -d dataprocessor seed (Redeploying dataprocessor and seed from the base Docker image because they are stuck in some undesired state -- this is 2nd step to redeploy a container. You can input any service name such as web, seed, monitoring, data-analyzer, etc.)


service docker stop (stop Docker service)

service docker start (start Docker service)