Docker – Sharing data between containers

Procedure 1: Using Data Containers Step 1 - Create Container Data Containers are containers which sole responsibility to be a place to store/manage data. Like other containers they are managed by the host system. However, they don't run when you perform a docker ps command. To create a Data Container we first create a container with a … Continue reading Docker – Sharing data between containers


Docker – difference between CMD and ENTRYPOINT

The CMD line in a Dockerfile defines the default command to run when a container is launched. If the command requires arguments then you need to use an array, for example ["cmd", "-a", "arga value", "-b", "argb-value"], which will be combined together and the command cmd -a arga value -b argb-valuewould be run. An alternative approach to CMD is ENTRYPOINT. While … Continue reading Docker – difference between CMD and ENTRYPOINT

Docker Swarm – Manager Nodes

Reference: 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

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 - 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