Wednesday, January 4, 2017

Docker Container: A Start

Containers are about Software!
Here's what it looks like to run software with containers:

Find the software, on Docker Hub.

Download the software with docker pull, comes down as an image which is much like a zip file or msi installer. An image is an application packaging format.
Instead of installing the software, we create a container. So, a container--a stopped container--is like installed software. Docker unpacks the image onto the computer, creating a container. Note: if you just want to create a container, you can use docker create.
Then we run the container which is exactly like running an exe. It's the same thing under the covers!!!
We often use docker run to orchestrate all of these steps with one command, how convenient!

docker exec can be thought of as running another copy of our installed software, like when we launch an executable twice. For example, two copies of Microsoft Word. Or with MongoDB, we might run two mongo clients. After a container is created and running, we can use docker exec to run multiple applications, or multiple copies of the same app, inside the container.

Key differences between docker and traditional software

Traditional Software   Docker equivalent   docker command
Find Software
  Docker hub
Download software i.e a zip fileor a MSI
  Pull an image
  docker pull
Install Software
  Create a container from the image

  docker create

Start Software
  run the conatiner
  docker start
Stop Software
  stop the container
docker stop
Uninstall Software
  remove the
  docker rm
Not possible
  do all this with
one command!
  docker run

No comments:

Post a Comment

Featured Post

Amazon Route 53

Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service.Route 53  perform three main functions in any...