Getting Started with Docker08 Jul 2017
- Docker Container
- Docker Images
Docker provides the ability to package and run an application in a loosely isolated environment called container. The isolation and security allows you to run many containers simultaneously on a given host. Docker includes concept of versioned container repository so it is easy to keep track of changes.
Installing Docker on a machine gives your Docker Client and Daemon
- Image - An organized collection of files, configuration and installed programs, as well as set of instructions as to how to execute those items.
- Container - Running instance of Docker Image. Containers run the actual application. A container includes an application and all of its dependencies. It shares the kernel with other containers and runs as an isolated process in user space on the host OS.
- Docker Daemon - The background service running on the host that manages building, running and distributing Docker containers.
- Docker Client - The command line tool that allows the user to interact with Docker Daemon
- Docker Store - Registry of Docker Images
- Dockerfile - Text file that contains a list of commands that the Docker daemon calls when creating an image. Main set of instructions a User can execute to form a new Docker Image
- A Docker container is a runnable instance of a Docker image. You can create, run, start, stop, move, or delete a container using Docker API or CLI commands.
- Docker containers are the run components of Docker.
- Container Lifecycle
docker create- Creates Container but does not start it
docker start- Starts a Container so it is running
docker run- Creates and Starts Container in on operation
docker stop- Stops a running Container
docker rm- Deletes Container
docker update- Update Container Resorce Limit
Docker Run - Running a Docker Container from Docker Image
Docker run is a docker client command. Client makes corresponding command to daemon to create a docker container from docker image.
Other Docker Container Commands
- Docker Images are basis of containers
- Base Image
- Image that have no parent Image
- Child Image
- Image that build on base Image and Add Additional Functionality
Container and MicroServices
Microservices architecture is build on a principle of re-using REST based services. Microservices requires running small block of isolated code running in completed isolated environment. To facilitate this, Containers play a vital role to speed development and code deployment. With advent of microservices architecture, Containers have taken software deployment to whole new level. By providing the level of isolation required to run software within its own space, it has made much easier to deploy and tear down code rapidly. Containers are more resource efficient than full blown virtual machines.