Docker Swarm – Manager Nodes

Reference: https://docs.docker.com/engine/swarm/swarm-tutorial/ On the manager node (to be) initialize the docker swarm cluster - "docker swarm init". It also prints the command to run on the worker node to join the cluster. If we lose the command then run "docker swarm join-token worker" on the manager node to get it and run on the nodes to … Continue reading Docker Swarm – Manager Nodes

Advertisements

Docker Swarm – Start Stop Node Container

In my previous blog Docker Swarm – Beginning I've started a service called "web" in global mode which runs a single instance of container on all nodes in the swarm. Now lets try to stop container/node and check the behavior. Stop container - As you can see in the below screenshot stopping a container quickly … Continue reading Docker Swarm – Start Stop Node Container

Docker Swarm – Beginning

There is already good documentation from Docker on swarm - https://docs.docker.com/engine/swarm/ In simple terms - Docker swarm is an orchestration tool to manage docker containers running on nodes ( physical or virtual servers ). We mark nodes as two types - Manager node and worker node. Manager node which does cluster management and hand over the … Continue reading Docker Swarm – Beginning

Docker – All commands hanging

For some reason after reboot of system - not able to run any of docker commands. [root@ip-172-31-35-29 run]# docker ps Cannot connect to the Docker daemon. Is the docker daemon running on this host? [root@ip-172-31-35-29 run]# [root@ip-172-31-35-29 run]# service docker start Starting docker:        .                                  [  OK  ] [root@ip-172-31-35-29 run]# docker ps ^C [root@ip-172-31-35-29 run]# docker … Continue reading Docker – All commands hanging

Docker – Some Commands

To run the docker with host port matching and with mounts #docker run -tiP -p 0.0.0.0:: -v : To get to console of running container #docker exec -ti /bin/bash To get the host ports which docker ports are bind to- check DOCKER chain Ref: https://docs.docker.com/engine/reference/commandline/inspect/ [root@ip-172-31-35-29 ~]# docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} … Continue reading Docker – Some Commands