Getting Started With Docker And ASP.NET Core: Intro to Docker

Introduction 

    Docker is a platform for developing, shipping and running applications using container Hypervisor-based virtualization technology.

    Docker allows you to package an application with all of its dependencies into a standardized unit for software development.

    Docker containers wrap up a piece of software in a complete file system that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.

    You can run a single service per container. Let's say one container for sql , one container for web application.


    (Source : docker.com)

    Container VS Virtual machine

    Virtual Machine


    Virtual machine includes application, binaries and guest operating system which consumes more space.
    1. Virtual machine consume more resources, RAM and disk space.


      (Source : docker.com)

    2. The Container

      a. 
      The container is a hypervisor based virtualization technology.

      b. It includes the binaries to run the application (all of its dependencies ) and they share the kernel with other containers.


      (Source : docker.com)
    Why is docker architecture popular: Nowadays docker is getting popularity due to its architecture

      There are numerous reasons for its popularity

      1. Ease of use: Docker is designed in such a way so that developers, architects and administration can take advantage of this. Docker allows you to package a application while developing that run same on production server.
      1. Speed:Docker ship 7x more faster than other technology because it consume less resource & memory to run application
      1. LightweightContainers running on a single physical machine all share the same operating system kernel so they start instantly and make more efficient use of RAM. Images are constructed from layered file systems so they can share common files, making disk usage and image downloads much more efficient .
      1. Docker HubDocker hub is a public repository for docker images. We can say its app store of docker images. You can create your own private docker hub by creating private repository.
      1. Secure: Containers isolate applications from each other and the underlying infrastructure while providing an added layer of protection for the application.
      1. Modularity and scalability: Docker can easily break out your application and docker images . Let's say multiple web applicationsand database servers are running, you can easily scale up and down. Docker containers spin up and down in seconds making it easy to scale an application service at any time to satisfy peak customer demand, then just as easily spin down those containers to only use the resources you need when you need it.
      1. Open: Docker containers are based on open standards that allow containers to run on every platform, cloud and machine.
      The future of docker :

        The docker container is growing very fast.


        Linux platform


        Windows platform

        The Docker platform:

          Docker platform includes

          1. Docker engine: Docker engine is the program that enables containers to be built, ship and run.
          2. Images
          3. Containers: Isolated application platform. Contains everything needed to run your application.
          • Each container has its own.
          • Root file system.
          • Processes.
          • Memory.
          • Devices
          • Network ports
          1. Registry
          2. Repositories
          3. Docker Hub
          4. Docker Orchestration tools:

            Three tools for orchestration distributed application with docker.

            • Docker Machine: Tool that proviosions docker hosts and install the docker engine on them.
            • Docker Swarm: Tool that cluster many engine and schedule containers.
            • Docker Compose: Tool to create and manage multi- container application.

            Intro to Images:
            It is a read only template used to create containers. Built by you or other docker users. Stored in the docker hub or your local repository.
              Docker images is a layered architecture. A docker image contains a base image and that image is referenced by other layers.

              Docker images is manifest of software. It contain the binaries to run a application. Docker images are the basis of containers.

              Summary

              In this article I've covered an introduction of the docker platform. Build,ship and run.